1 /* 2 * Copyright 2003,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.apache.xerces.xs; 18 19 /** 20 * The <code>XSObjectList</code> interface provides the abstraction of an 21 * immutable ordered collection of <code>XSObject</code>s, without defining 22 * or constraining how this collection is implemented. 23 */ 24 public interface XSObjectList { 25 /** 26 * The number of <code>XSObjects</code> in the list. The range of valid 27 * child object indices is 0 to <code>length-1</code> inclusive. 28 */ 29 public int getLength(); 30 31 /** 32 * Returns the <code>index</code>th item in the collection or 33 * <code>null</code> if <code>index</code> is greater than or equal to 34 * the number of objects in the list. The index starts at 0. 35 * @param index index into the collection. 36 * @return The <code>XSObject</code> at the <code>index</code>th 37 * position in the <code>XSObjectList</code>, or <code>null</code> if 38 * the index specified is not valid. 39 */ 40 public XSObject item(int index); 41 42 } 43