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>

private static final class CheckedArrayList.Mediator<E> extends AbstractList<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).