- All Implemented Interfaces:
Iterable<Object>
,Collection<Object>
,List<Object>
,ObjectList
Contains a list of Objects.
@xerces.internal
- Version:
- $Id: ObjectListImpl.java 789785 2009-06-30 15:10:26Z knoaman $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if theObject
item
is a member of this list.get
(int index) int
The number ofObject
s in the list.item
(int index) Returns theindex
th item in the collection ornull
ifindex
is greater than or equal to the number of objects in the list.int
size()
Object[]
toArray()
Object[]
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, 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
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList
-
Field Details
-
EMPTY_LIST
An immutable empty list.
-
-
Constructor Details
-
ObjectListImpl
-
-
Method Details
-
getLength
public int getLength()Description copied from interface:ObjectList
The number ofObject
s in the list. The range of valid child object indices is 0 tolength-1
inclusive.- Specified by:
getLength
in interfaceObjectList
-
contains
Description copied from interface:ObjectList
Checks if theObject
item
is a member of this list.- Specified by:
contains
in interfaceCollection<Object>
- Specified by:
contains
in interfaceList<Object>
- Specified by:
contains
in interfaceObjectList
- Overrides:
contains
in classAbstractCollection<Object>
- Parameters:
item
-Object
whose presence in this list is to be tested.- Returns:
- True if this list contains the
Object
item
.
-
item
Description copied from interface:ObjectList
Returns theindex
th item in the collection ornull
ifindex
is greater than or equal to the number of objects in the list. The index starts at 0.- Specified by:
item
in interfaceObjectList
- Parameters:
index
- index into the collection.- Returns:
- The
Object
at theindex
th position in theObjectList
, ornull
if the index specified is not valid - greater than or equal to the number of items in the list or less than zero.
-
get
-
size
public int size()- Specified by:
size
in interfaceCollection<Object>
- Specified by:
size
in interfaceList<Object>
- Specified by:
size
in classAbstractCollection<Object>
-
toArray
- Specified by:
toArray
in interfaceCollection<Object>
- Specified by:
toArray
in interfaceList<Object>
- Overrides:
toArray
in classAbstractCollection<Object>
-
toArray
- Specified by:
toArray
in interfaceCollection<Object>
- Specified by:
toArray
in interfaceList<Object>
- Overrides:
toArray
in classAbstractCollection<Object>
-