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

java.lang.Object
  |
  +--org.apache.xerces.impl.xs.util.ObjectListImpl
All Implemented Interfaces:
ObjectList

public class ObjectListImpl
extends java.lang.Object
implements ObjectList

Containts a list of Object's.

Version:
$Id: ObjectListImpl.java,v 1.1 2002/06/17 18:41:46 elena Exp $
Author:
Sandy Gao, IBM

Constructor Summary
ObjectListImpl(java.lang.Object[] array, int length)
          Construct an ObjectList implementation
ObjectListImpl(java.util.Vector v)
           
 
Method Summary
 int getLength()
          The number of Objects in the list.
 java.lang.Object item(int index)
          Returns the indexth item in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectListImpl

public ObjectListImpl(java.util.Vector v)

ObjectListImpl

public ObjectListImpl(java.lang.Object[] array,
                      int length)
Construct an ObjectList 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 ObjectList

item

public java.lang.Object item(int index)
Description copied from interface: ObjectList
Returns the indexth item in the collection. The index starts at 0. If index is greater than or equal to the number of objects in the list, this returns null.

Specified by:
item in interface ObjectList
Parameters:
index - index into the collection.
Returns:
The Objectat the indexth position in the ObjectList, or null if that is not a valid index.


Copyright © 1999-2002 Apache XML Project. All Rights Reserved.