Package org.apache.xerces.impl.xs.util
Class XSObjectListImpl
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
org.apache.xerces.impl.xs.util.XSObjectListImpl
- All Implemented Interfaces:
Iterable
,Collection
,List
,SequencedCollection
,org.apache.xerces.xs.XSObjectList
Contains a list of XSObjects.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XSObjectListImpl.java 776079 2009-05-18 20:22:27Z mrglavas $
- Author:
- Sandy Gao, IBM
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionXSObjectListImpl
(org.apache.xerces.xs.XSObject[] array, int length) Construct an XSObjectList implementation -
Method Summary
Modifier and TypeMethodDescriptionvoid
addXSObject
(int index, org.apache.xerces.xs.XSObject object) void
addXSObject
(org.apache.xerces.xs.XSObject object) void
boolean
get
(int index) int
The number ofXSObjects
in the list.org.apache.xerces.xs.XSObject
item
(int index) Returns theindex
th item in the collection.iterator()
listIterator
(int index) int
size()
Object[]
toArray()
Object[]
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, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, containsAll, equals, getFirst, getLast, hashCode, indexOf, isEmpty, lastIndexOf, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, sort, spliterator, subList
-
Field Details
-
EMPTY_LIST
An immutable empty list.
-
-
Constructor Details
-
XSObjectListImpl
public XSObjectListImpl() -
XSObjectListImpl
public XSObjectListImpl(org.apache.xerces.xs.XSObject[] array, int length) Construct an XSObjectList implementation- Parameters:
array
- the data arraylength
- the number of elements
-
-
Method Details
-
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 interfaceorg.apache.xerces.xs.XSObjectList
-
item
public org.apache.xerces.xs.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 interfaceorg.apache.xerces.xs.XSObjectList
- 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(org.apache.xerces.xs.XSObject object) -
addXSObject
public void addXSObject(int index, org.apache.xerces.xs.XSObject object) -
contains
- Specified by:
contains
in interfaceCollection
- Specified by:
contains
in interfaceList
- Overrides:
contains
in classAbstractCollection
-
get
- 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
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in interfaceList
- Overrides:
iterator
in classAbstractList
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
listIterator
- Specified by:
listIterator
in interfaceList
- Overrides:
listIterator
in classAbstractList
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classAbstractCollection
-
toArray
- Specified by:
toArray
in interfaceCollection
- Specified by:
toArray
in interfaceList
- Overrides:
toArray
in classAbstractCollection
-