E - the type of content of this Listpublic class ImmutableArrayList<E> extends ImmutableAbstractList<E>
Copyright (c) 2016-2019 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version May 7, 2016copyOrWrap| Constructor and Description |
|---|
ImmutableArrayList(Collection<? extends E> collection) |
ImmutableArrayList(ImmutableAbstractCollection<? extends E> collection) |
ImmutableArrayList(ImmutableAbstractList<E> list,
Immutable copyOrWrap) |
ImmutableArrayList(List<E> list,
Immutable copyOrWrap) |
| Modifier and Type | Method and Description |
|---|---|
protected List<E> |
getCollection()
Returns the underlying collection of this immutable collection.
|
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.
|
ArrayList<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(Collection<? extends E> collection)
collection - Collection<? extends E>; the collection to use for the immutable list.public ImmutableArrayList(List<E> list, Immutable copyOrWrap)
list - List<E>; the list to use for the immutable list.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original
collectionpublic ImmutableArrayList(ImmutableAbstractCollection<? extends E> collection)
collection - ImmutableAbstractCollection<? extends E>; the collection to use for the immutable list.public ImmutableArrayList(ImmutableAbstractList<E> list, Immutable copyOrWrap)
list - ImmutableAbstractList<E>; the list to use for the immutable list.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original
collectionpublic final ArrayList<E> toList()
protected List<E> getCollection()
getCollection in class ImmutableAbstractList<E>public final ImmutableList<E> subList(int fromIndex, int toIndex)
fromIndex - int; low endpoint (inclusive) of the subListtoIndex - int; high endpoint (exclusive) of the subListpublic final String toString()
toString in class ImmutableAbstractList<E>Copyright © 2018–2019 Delft University of Technology. All rights reserved.