XmlObjectList Interface

com.bea.xml
XmlObjectList Interface

public interface XmlObjectList

Interface to represent lists of XmlObject instances returned from a query. Used also as a convenient typed way of collecting XmlObject instances.

Nested Class Summary

public static final classXmlObjectList.Factory
           Static factory class for creating new instances of XmlObjectList

Method Summary

public void
add(XmlObject xml)
Adds a XmlObject to the end of the list.
public void
addAll(XmlObjectList xmlList)
Appends the contents of another list to this list.
public void
addAll(XmlObject[] xmlArray)
Appends an array of XmlObject instances to this list.
public void
clear()
Clears out the contents of this list.
public XmlObject
get(int index)
Gets the XmlObject at a specified position in the list.
public boolean
isEmpty()
Tests if this XmlList is empty.
public Iterator
iterator()
Returns an Iterator over all the XmlObject instances contained in this list.
public int
size()
Returns the number of XmlObject instances contained in this list.
public XmlObject[]
toArray()
Returns a copy of the contents of the XmlList in a newly created array of XmlObjects.

Method Detail

add(XmlObject) Method

public void add(XmlObject xml)
Adds a XmlObject to the end of the list.

Parameters

xml
the XmlObject instance to add to the list

addAll(XmlObjectList) Method

public void addAll(XmlObjectList xmlList)
Appends the contents of another list to this list.

Parameters

xmlList
the list which is to be appended to this list.

addAll(XmlObject[]) Method

public void addAll(XmlObject[] xmlArray)
Appends an array of XmlObject instances to this list.

Parameters

xmlArray
the array which is to be appended to this list.

clear() Method

public void clear()
Clears out the contents of this list. After this operation, isEmpty() will return true.


get(int) Method

public XmlObject get(int index)
Gets the XmlObject at a specified position in the list.

Parameters

index
the specified position

Returns

the XmlObject at the position in this list.

isEmpty() Method

public boolean isEmpty()
Tests if this XmlList is empty. This is equivalent to size() == 0.

Returns

boolean indicating if this list is empty.

iterator() Method

public Iterator iterator()
Returns an Iterator over all the XmlObject instances contained in this list. This iterator will throw an UnsupportedOperationException in response to its remove method.

Returns

Iterator over the contents of this list

size() Method

public int size()
Returns the number of XmlObject instances contained in this list.

Returns

int size of the list.

toArray() Method

public XmlObject[] toArray()
Returns a copy of the contents of the XmlList in a newly created array of XmlObjects.

Returns

array of XmlObject instances which is a copy of the contents of the list.