Package org.apache.sis.internal.util
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).-
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, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, 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, 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>
-