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 XSObjectListImpl
EMPTY_LIST
An 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 void
addXSObject(int index, XSObject object)
void
addXSObject(XSObject object)
void
clearXSObjectList()
boolean
contains(Object value)
Object
get(int index)
int
getLength()
The number ofXSObjects
in the list.XSObject
item(int index)
Returns theindex
th item in the collection.Iterator
iterator()
ListIterator
listIterator()
ListIterator
listIterator(int index)
int
size()
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 ofXSObjects
in the list. The range of valid child node indices is 0 tolength-1
inclusive.- Specified by:
getLength
in interfaceXSObjectList
-
item
public XSObject item(int index)
Returns theindex
th item in the collection. The index starts at 0. Ifindex
is greater than or equal to the number of nodes in the list, this returnsnull
.- Specified by:
item
in interfaceXSObjectList
- Parameters:
index
- index into the collection.- Returns:
- The XSObject at the
index
th position in theXSObjectList
, ornull
if 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:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
- Overrides:
contains
in classAbstractCollection
-
get
public Object get(int index)
- Specified by:
get
in interfaceList
- Specified by:
get
in classAbstractList
-
size
public int size()
- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
- Specified by:
size
in classAbstractCollection
-
iterator
public Iterator iterator()
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in interfaceList
- Overrides:
iterator
in classAbstractList
-
listIterator
public ListIterator listIterator()
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classAbstractCollection
-
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classAbstractCollection
-
-