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, subListMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods 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:
containsin interfaceCollection<Object>- Specified by:
containsin interfaceList<Object>- Overrides:
containsin classAbstractCollection<Object>
-
get
-
indexOf
-
iterator
-
set
-
size
public int size()- Specified by:
sizein interfaceCollection<Object>- Specified by:
sizein interfaceList<Object>- Specified by:
sizein classAbstractCollection<Object>
-