org.apache.xerces.impl.xs.util

Class XSObjectListImpl

public class XSObjectListImpl extends Object implements XSObjectList

Containts a list of XSObject's.

Version: $Id: XSObjectListImpl.java,v 1.11 2004/12/03 15:50:44 mrglavas Exp $

Author: Sandy Gao, IBM

UNKNOWN:

Field Summary
static XSObjectListEMPTY_LIST
An immutable empty list.
Constructor Summary
XSObjectListImpl()
XSObjectListImpl(XSObject[] array, int length)
Construct an XSObjectList implementation
Method Summary
voidadd(XSObject object)
voidadd(int index, XSObject object)
voidclear()
intgetLength()
The number of XSObjects in the list.
XSObjectitem(int index)
Returns the indexth item in the collection.

Field Detail

EMPTY_LIST

public static final XSObjectList EMPTY_LIST
An immutable empty list.

Constructor Detail

XSObjectListImpl

public XSObjectListImpl()

XSObjectListImpl

public XSObjectListImpl(XSObject[] array, int length)
Construct an XSObjectList implementation

Parameters: array the data array length the number of elements

Method Detail

add

public void add(XSObject object)

add

public void add(int index, XSObject object)

clear

public void clear()

getLength

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

item

public XSObject item(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.

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-2005 Apache XML Project. All Rights Reserved.