Class CheckedArrayList.Mediator<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.apache.sis.internal.util.CheckedArrayList.Mediator<E>
- Type Parameters:
E- the type or list elements.
- All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>
- Enclosing class:
CheckedArrayList<E>
A wrapper around the given array for use by
CheckedArrayList.addAll(Collection) only.
This wrapper violates some List method contracts, so it shall really be used only as
a temporary object for passing array to ArrayList.addAll(…) methods.
In particular toArray() returns directly the internal array, because this is the method to be
invoked by ArrayList.addAll(…) (this is actually the only important method in this wrapper).- Since:
- 0.3
- Version:
- 1.0
-
Field Summary
FieldsFields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, streamMethods inherited from interface List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray
-
Field Details
-
array
-
-
Constructor Details
-
Mediator
Mediator(E[] array)
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceList<E>- Specified by:
sizein classAbstractCollection<E>
-
get
-
toArray
- Specified by:
toArrayin interfaceCollection<E>- Specified by:
toArrayin interfaceList<E>- Overrides:
toArrayin classAbstractCollection<E>
-