Class XSObjectListImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList
-
- org.apache.jena.ext.xerces.impl.xs.util.XSObjectListImpl
-
- All Implemented Interfaces:
java.lang.Iterable
,java.util.Collection
,java.util.List
,XSObjectList
public class XSObjectListImpl extends java.util.AbstractList implements 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
Fields Modifier and Type Field Description static XSObjectListImpl
EMPTY_LIST
An immutable empty list.
-
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(java.lang.Object value)
java.lang.Object
get(int index)
int
getLength()
The number ofXSObjects
in the list.XSObject
item(int index)
Returns theindex
th item in the collection.java.util.Iterator
iterator()
java.util.ListIterator
listIterator()
java.util.ListIterator
listIterator(int index)
int
size()
java.lang.Object[]
toArray()
java.lang.Object[]
toArray(java.lang.Object[] a)
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, remove, set, subList
-
-
-
-
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(java.lang.Object value)
- Specified by:
contains
in interfacejava.util.Collection
- Specified by:
contains
in interfacejava.util.List
- Overrides:
contains
in classjava.util.AbstractCollection
-
get
public java.lang.Object get(int index)
- Specified by:
get
in interfacejava.util.List
- Specified by:
get
in classjava.util.AbstractList
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection
- Specified by:
size
in interfacejava.util.List
- Specified by:
size
in classjava.util.AbstractCollection
-
iterator
public java.util.Iterator iterator()
- Specified by:
iterator
in interfacejava.util.Collection
- Specified by:
iterator
in interfacejava.lang.Iterable
- Specified by:
iterator
in interfacejava.util.List
- Overrides:
iterator
in classjava.util.AbstractList
-
listIterator
public java.util.ListIterator listIterator()
- Specified by:
listIterator
in interfacejava.util.List
- Overrides:
listIterator
in classjava.util.AbstractList
-
listIterator
public java.util.ListIterator listIterator(int index)
- Specified by:
listIterator
in interfacejava.util.List
- Overrides:
listIterator
in classjava.util.AbstractList
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection
- Specified by:
toArray
in interfacejava.util.List
- Overrides:
toArray
in classjava.util.AbstractCollection
-
toArray
public java.lang.Object[] toArray(java.lang.Object[] a)
- Specified by:
toArray
in interfacejava.util.Collection
- Specified by:
toArray
in interfacejava.util.List
- Overrides:
toArray
in classjava.util.AbstractCollection
-
-