- All Implemented Interfaces:
Iterable<E>, ImmutableCollection<E>, ImmutableList<E>
- Enclosing interface:
ImmutableList<E extends @Nullable Object>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ImmutableList
ImmutableList.SubList<E> -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this collection contains the specified element.booleancontainsAll(Collection<? extends E> elements) Returnstrueif this collection contains all elements in the specified collection.booleanget(int index) Returns the element at the specified index in the list.inthashCode()intReturns the index of the first occurrence of the specified element in the list, or-1if the specified element is not contained in the list.iterator()Returns an iterator over the elements of this collection.intlastIndexOf(E element) Returns the index of the last occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.Returns a list iterator over the elements in this list (in proper sequence).listIterator(int index) Returns a list iterator over the elements in this list (in proper sequence), starting at the specifiedindex.intsize()Returns the number of elements in this collection.subList(int fromIndex, int toIndex) Returns a view of the portion of this list between the specifiedfromIndex(inclusive) andtoIndex(exclusive).toString()Methods inherited from interface ImmutableCollection
isEmpty, parallelStream, streamMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
get
Description copied from interface:ImmutableListReturns the element at the specified index in the list.- Specified by:
getin interfaceImmutableList<E extends @Nullable Object>
-
size
public int size()Description copied from interface:ImmutableCollectionReturns the number of elements in this collection.- Specified by:
sizein interfaceImmutableCollection<E extends @Nullable Object>
-
contains
Description copied from interface:ImmutableCollectionReturns
trueif this collection contains the specified element.More formally, returns
trueif and only if this collection contains at least one elementesuch thatObjects.equals(o, e).- Specified by:
containsin interfaceImmutableCollection<E extends @Nullable Object>
-
containsAll
Description copied from interface:ImmutableCollectionReturnstrueif this collection contains all elements in the specified collection.- Specified by:
containsAllin interfaceImmutableCollection<E extends @Nullable Object>
-
iterator
-
indexOf
Description copied from interface:ImmutableListReturns the index of the first occurrence of the specified element in the list, or
-1if the specified element is not contained in the list.For lists containing more than
Int.MAX_VALUEelements, a result of this function is unspecified.- Specified by:
indexOfin interfaceImmutableList<E extends @Nullable Object>
-
lastIndexOf
Description copied from interface:ImmutableListReturns the index of the last occurrence of the specified element in the list, or -1 if the specified element is not contained in the list.
For lists containing more than
Int.MAX_VALUEelements, a result of this function is unspecified.- Specified by:
lastIndexOfin interfaceImmutableList<E extends @Nullable Object>
-
listIterator
Description copied from interface:ImmutableListReturns a list iterator over the elements in this list (in proper sequence).- Specified by:
listIteratorin interfaceImmutableList<E extends @Nullable Object>
-
listIterator
Description copied from interface:ImmutableListReturns a list iterator over the elements in this list (in proper sequence), starting at the specifiedindex.- Specified by:
listIteratorin interfaceImmutableList<E extends @Nullable Object>
-
subList
Description copied from interface:ImmutableListReturns a view of the portion of this list between the specified
fromIndex(inclusive) andtoIndex(exclusive).The returned list is backed by this list.
- Specified by:
subListin interfaceImmutableList<E extends @Nullable Object>
-
hashCode
-
equals
-
toString
-