Class XSObjectListImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.util.XSObjectListImpl
-
- All Implemented Interfaces:
Iterable,Collection,List,XSObjectList
public class XSObjectListImpl extends AbstractList implements XSObjectList
Contains a list of XSObjects.- Version:
- $Id$
- Author:
- Sandy Gao, IBM
-
-
Field Summary
Fields Modifier and Type Field Description static XSObjectListImplEMPTY_LISTAn immutable empty list.-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description XSObjectListImpl()XSObjectListImpl(XSObject[] array, int length)Construct an XSObjectList implementation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddXSObject(int index, XSObject object)voidaddXSObject(XSObject object)voidclearXSObjectList()booleancontains(Object value)Objectget(int index)intgetLength()The number ofXSObjectsin the list.XSObjectitem(int index)Returns theindexth item in the collection.Iteratoriterator()ListIteratorlistIterator()ListIteratorlistIterator(int index)intsize()Object[]toArray()Object[]toArray(Object[] a)-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
-
-
-
Field Detail
-
EMPTY_LIST
public static final XSObjectListImpl 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 arraylength- the number of elements
-
-
Method Detail
-
getLength
public int getLength()
The number ofXSObjectsin the list. The range of valid child node indices is 0 tolength-1inclusive.- Specified by:
getLengthin interfaceXSObjectList
-
item
public XSObject item(int index)
Returns theindexth item in the collection. The index starts at 0. Ifindexis greater than or equal to the number of nodes in the list, this returnsnull.- Specified by:
itemin interfaceXSObjectList- Parameters:
index- index into the collection.- Returns:
- The XSObject at the
indexth position in theXSObjectList, ornullif that is not a valid index.
-
clearXSObjectList
public void clearXSObjectList()
-
addXSObject
public void addXSObject(XSObject object)
-
addXSObject
public void addXSObject(int index, XSObject object)
-
contains
public boolean contains(Object value)
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceList- Overrides:
containsin classAbstractCollection
-
get
public Object get(int index)
- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
-
iterator
public Iterator iterator()
- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceIterable- Specified by:
iteratorin interfaceList- Overrides:
iteratorin classAbstractList
-
listIterator
public ListIterator listIterator()
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classAbstractList
-
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIteratorin interfaceList- Overrides:
listIteratorin classAbstractList
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList- Overrides:
toArrayin classAbstractCollection
-
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceList- Overrides:
toArrayin classAbstractCollection
-
-