- 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 TypeMethodDescriptionbooleanChecks if theObjectitemis a member of this list.get(int index) intThe number ofObjects in the list.item(int index) Returns theindexth item in the collection ornullifindexis greater than or equal to the number of objects in the list.intsize()Object[]toArray()Object[]Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subListMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toStringMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:ObjectListThe number ofObjects in the list. The range of valid child object indices is 0 tolength-1inclusive.- Specified by:
getLengthin interfaceObjectList
-
contains
Description copied from interface:ObjectListChecks if theObjectitemis a member of this list.- Specified by:
containsin interfaceCollection<Object>- Specified by:
containsin interfaceList<Object>- Specified by:
containsin interfaceObjectList- Overrides:
containsin classAbstractCollection<Object>- Parameters:
item-Objectwhose presence in this list is to be tested.- Returns:
- True if this list contains the
Objectitem.
-
item
Description copied from interface:ObjectListReturns theindexth item in the collection ornullifindexis greater than or equal to the number of objects in the list. The index starts at 0.- Specified by:
itemin interfaceObjectList- Parameters:
index- index into the collection.- Returns:
- The
Objectat theindexth position in theObjectList, ornullif 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:
sizein interfaceCollection<Object>- Specified by:
sizein interfaceList<Object>- Specified by:
sizein classAbstractCollection<Object>
-
toArray
- Specified by:
toArrayin interfaceCollection<Object>- Specified by:
toArrayin interfaceList<Object>- Overrides:
toArrayin classAbstractCollection<Object>
-
toArray
- Specified by:
toArrayin interfaceCollection<Object>- Specified by:
toArrayin interfaceList<Object>- Overrides:
toArrayin classAbstractCollection<Object>
-