Class ArrayListWrapper
- All Implemented Interfaces:
Iterable<Object>
,Collection<Object>
,List<Object>
,RandomAccess
A class that wraps an array within an AbstractList.
It overrides some methods because introspection uses this class a marker for wrapped arrays; the declared class for these method is thus ArrayListWrapper. The methods are get/set/size/contains and indexOf because it is used by contains.
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, lastIndexOf, listIterator, listIterator, remove, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, 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
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
array
The array to wrap.
-
-
Constructor Details
-
ArrayListWrapper
Create the wrapper.- Parameters:
anArray
-array
-
-
Method Details
-
contains
- Specified by:
contains
in interfaceCollection<Object>
- Specified by:
contains
in interfaceList<Object>
- Overrides:
contains
in classAbstractCollection<Object>
-
get
-
indexOf
-
iterator
-
set
-
size
public int size()- Specified by:
size
in interfaceCollection<Object>
- Specified by:
size
in interfaceList<Object>
- Specified by:
size
in classAbstractCollection<Object>
-