java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
org.apache.jena.ext.xerces.impl.xs.util.XSObjectListImpl
- All Implemented Interfaces:
Iterable
,Collection
,List
,XSObjectList
Contains a list of XSObjects.
@xerces.internal
- Version:
- $Id: XSObjectListImpl.java 776079 2009-05-18 20:22:27Z mrglavas $
- Author:
- Sandy Gao, IBM
-
Field Summary
-
Constructor Summary
ConstructorDescriptionXSObjectListImpl
(XSObject[] array, int length) Construct an XSObjectList implementation -
Method Summary
Modifier and TypeMethodDescriptionvoid
addXSObject
(int index, XSObject object) void
addXSObject
(XSObject object) void
boolean
get
(int index) int
The number ofXSObjects
in the list.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, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Field Details
-
EMPTY_LIST
An immutable empty list.
-
-
Constructor Details
-
XSObjectListImpl
public XSObjectListImpl() -
XSObjectListImpl
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 interfaceXSObjectList
-
item
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
-
addXSObject
-
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
-