org.apache.xerces.impl.xs.util
Class StringListImpl

java.lang.Object
  extended by org.apache.xerces.impl.xs.util.StringListImpl
All Implemented Interfaces:
StringList

public class StringListImpl
extends java.lang.Object
implements StringList

Containts a list of Object's.

Version:
$Id: StringListImpl.java 446723 2006-09-15 20:37:45Z mrglavas $
Author:
Sandy Gao, IBM

Field Summary
static StringList EMPTY_LIST
          An immutable empty list.
 
Constructor Summary
StringListImpl(java.lang.String[] array, int length)
          Construct an XSObjectList implementation
StringListImpl(java.util.Vector v)
           
 
Method Summary
 boolean contains(java.lang.String item)
          Checks if the GenericString item is a member of this list.
 int getLength()
          The number of Objects in the list.
 java.lang.String item(int index)
          Returns the indexth item in the collection or null if index is greater than or equal to the number of objects in the list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_LIST

public static final StringList EMPTY_LIST
An immutable empty list.

Constructor Detail

StringListImpl

public StringListImpl(java.util.Vector v)

StringListImpl

public StringListImpl(java.lang.String[] array,
                      int length)
Construct an XSObjectList implementation

Parameters:
array - the data array
length - the number of elements
Method Detail

getLength

public int getLength()
The number of Objects in the list. The range of valid child node indices is 0 to length-1 inclusive.

Specified by:
getLength in interface StringList

contains

public boolean contains(java.lang.String item)
Checks if the GenericString item is a member of this list.

Specified by:
contains in interface StringList
Parameters:
item - GenericString whose presence in this list is to be tested.
Returns:
True if this list contains the GenericString item.

item

public java.lang.String item(int index)
Description copied from interface: StringList
Returns the indexth item in the collection or null if index is greater than or equal to the number of objects in the list. The index starts at 0.

Specified by:
item in interface StringList
Parameters:
index - index into the collection.
Returns:
The GenericString at the indexth position in the StringList, or null if the index specified is not valid.