E - the type of content of this Listpublic interface ImmutableList<E> extends ImmutableCollection<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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Force to redefine equals for the implementations of immutable collection classes.
|
E |
get(int index)
Returns the element at the specified position in this immutable list.
|
int |
hashCode()
Force to redefine hashCode for the implementations of immutable collection classes.
|
int |
indexOf(Object o)
Returns the index of the first occurrence of the specified element in this immutable list, or -1 if this
immutable list does not contain the element.
|
int |
lastIndexOf(Object o)
Returns the index of the last occurrence of the specified element in this immutable list, or -1 if this immutable
list does not contain the element.
|
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.
|
contains, containsAll, containsAll, isCopy, isEmpty, isWrap, iterator, parallelStream, size, spliterator, stream, toArray, toArray, toCollectionE get(int index)
index - int; index of the element to returnIndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())int indexOf(Object o)
o - Object; element to search forClassCastException - if the type of the specified element is incompatible with this immutable listNullPointerException - if the specified element is null and this immutable list does not permit null
elementsint lastIndexOf(Object o)
o - Object; element to search forClassCastException - if the type of the specified element is incompatible with this immutable listNullPointerException - if the specified element is null and this immutable list does not permit null
elementsImmutableList<E> subList(int fromIndex, int toIndex)
fromIndex - int; low endpoint (inclusive) of the subListtoIndex - int; high endpoint (exclusive) of the subListIndexOutOfBoundsException - for an illegal endpoint index value
(fromIndex < 0 || toIndex > size ||
fromIndex > toIndex)List<E> toList()
boolean equals(Object obj)
equals in interface ImmutableCollection<E>equals in class Objectobj - Object; the object to compare this collection withint hashCode()
hashCode in interface ImmutableCollection<E>hashCode in class ObjectCopyright © 2018–2019 Delft University of Technology. All rights reserved.