2
* Copyright 2004,2005 The Apache Software Foundation.
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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
16
package org.apache.xerces.xs.datatypes;
19
* <p>The <code>ObjectList</code> is an immutable ordered collection of
20
* <code>Object</code>.</p>
22
* @author Ankit Pasricha, IBM
24
* @version $Id: ObjectList.java 320368 2005-05-15 20:37:23Z mrglavas $
26
public interface ObjectList {
29
* The number of <code>Object</code>s in the list. The range of
30
* valid child object indices is 0 to <code>length-1</code> inclusive.
32
public int getLength();
35
* Checks if the <code>Object</code> <code>item</code> is a
36
* member of this list.
37
* @param item <code>Object</code> whose presence in this list
39
* @return True if this list contains the <code>Object</code>
42
public boolean contains(Object item);
45
* Returns the <code>index</code>th item in the collection or
46
* <code>null</code> if <code>index</code> is greater than or equal to
47
* the number of objects in the list. The index starts at 0.
48
* @param index index into the collection.
49
* @return The <code>Object</code> at the <code>index</code>th
50
* position in the <code>ObjectList</code>, or <code>null</code> if
51
* the index specified is not valid - greater than or equal to the
52
* number of items in the list or less than zero.
54
public Object item(int index);