E - the type of content of this Listpublic class ImmutableArrayList<E> extends ImmutableAbstractList<E>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
ImmutableArrayList(ImmutableList<E> list) |
ImmutableArrayList(ImmutableList<E> list,
Immutable copyOrWrap) |
ImmutableArrayList(List<E> list) |
ImmutableArrayList(List<E> list,
Immutable copyOrWrap) |
| Modifier and Type | Method and Description |
|---|---|
protected ArrayList<E> |
getList()
Prepare the list of the right type for use a subclass.
|
ImmutableList<E> |
subList(int fromIndex,
int toIndex)
Returns a safe, immutable copy of the portion of this immutable list between the specified fromIndex, inclusive,
and toIndex, exclusive.
|
List<E> |
toList()
Returns a modifiable copy of this immutable list.
|
String |
toString() |
contains, containsAll, containsAll, equals, forEach, get, hashCode, indexOf, isEmpty, isWrap, iterator, lastIndexOf, parallelStream, size, spliterator, stream, toArray, toArray, toCollectionclone, finalize, getClass, notify, notifyAll, wait, wait, waitisCopypublic ImmutableArrayList(List<E> list)
list - the list to use as the immutable list.public ImmutableArrayList(List<E> list, Immutable copyOrWrap)
list - the list to use as the immutable list.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collectionpublic ImmutableArrayList(ImmutableList<E> list)
list - the list to use as the immutable list.public ImmutableArrayList(ImmutableList<E> list, Immutable copyOrWrap)
list - the list to use as the immutable list.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collectionprotected final ArrayList<E> getList()
@Override
protected ArrayList<E> getList()
{
return (ArrayList<E>) super.getList();
}
getList in class ImmutableAbstractList<E>public final List<E> toList()
public final ImmutableList<E> subList(int fromIndex, int toIndex)
fromIndex - low endpoint (inclusive) of the subListtoIndex - high endpoint (exclusive) of the subListpublic final String toString()
toString in class ImmutableAbstractList<E>Copyright © 2014–2016 Delft University of Technology. All rights reserved.