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

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

public class XSObjectListImpl
extends java.lang.Object
implements XSObjectList

Containts a list of XSObject's.

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

Constructor Summary
XSObjectListImpl(XSObject[] array, int length)
          Construct an XSObjectList implementation
 
Method Summary
 XSObject getItem(int index)
          Returns the indexth item in the collection.
 int getLength()
          The number of XSObjects in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSObjectListImpl

public XSObjectListImpl(XSObject[] 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 XSObjects in the list. The range of valid child node indices is 0 to length-1 inclusive.

Specified by:
getLength in interface XSObjectList

getItem

public XSObject getItem(int index)
Returns the indexth item in the collection. The index starts at 0. If index is greater than or equal to the number of nodes in the list, this returns null.

Specified by:
getItem in interface XSObjectList
Parameters:
index - index into the collection.
Returns:
The XSObject at the indexth position in the XSObjectList, or null if that is not a valid index.


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