KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > StringList


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>StringList</code> is an immutable ordered collection of
21  * <code>GenericString</code>.
22  */

23 public interface StringList {
24     /**
25      * The number of <code>GenericString</code>s in the list. The range of
26      * valid child object indices is 0 to <code>length-1</code> inclusive.
27      */

28     public int getLength();
29
30     /**
31      * Checks if the <code>GenericString</code> <code>item</code> is a member
32      * of this list.
33      * @param item <code>GenericString</code> whose presence in this list is
34      * to be tested.
35      * @return True if this list contains the <code>GenericString</code>
36      * <code>item</code>.
37      */

38     public boolean contains(String JavaDoc item);
39
40     /**
41      * Returns the <code>index</code>th item in the collection or
42      * <code>null</code> if <code>index</code> is greater than or equal to
43      * the number of objects in the list. The index starts at 0.
44      * @param index index into the collection.
45      * @return The <code>GenericString</code> at the <code>index</code>th
46      * position in the <code>StringList</code>, or <code>null</code> if
47      * the index specified is not valid.
48      */

49     public String JavaDoc item(int index);
50
51 }
52
Popular Tags