~ubuntu-branches/ubuntu/karmic/libxerces2-java/karmic

« back to all changes in this revision

Viewing changes to src/org/apache/xerces/xs/datatypes/ObjectList.java

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-12-04 17:37:55 UTC
  • mfrom: (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20061204173755-hb6ybrrrk097zhx7
Tags: 2.8.1-1ubuntu1
* Merge with Debian unstable; remaining changes:
  - Build -gcj package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2004,2005 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
package org.apache.xerces.xs.datatypes;
 
17
 
 
18
/**
 
19
 * <p>The <code>ObjectList</code> is an immutable ordered collection of 
 
20
 * <code>Object</code>.</p> 
 
21
 * 
 
22
 * @author Ankit Pasricha, IBM
 
23
 * 
 
24
 * @version $Id: ObjectList.java 320368 2005-05-15 20:37:23Z mrglavas $
 
25
 */
 
26
public interface ObjectList {
 
27
    
 
28
    /**
 
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. 
 
31
     */
 
32
    public int getLength();
 
33
    
 
34
    /**
 
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 
 
38
     *   is to be tested. 
 
39
     * @return  True if this list contains the <code>Object</code> 
 
40
     *   <code>item</code>. 
 
41
     */
 
42
    public boolean contains(Object item);
 
43
    
 
44
    /**
 
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. 
 
53
     */
 
54
    public Object item(int index);
 
55
    
 
56
}