E - Element typepublic class ConsList<E> extends AbstractImmutableList<E>
| Modifier | Constructor and Description |
|---|---|
private |
ConsList(E first,
List<E> rest) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
static <E> List<E> |
of(E first,
List<? extends E> rest)
Creates a ConsList.
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
protected List<E> |
toList() |
String |
toString() |
add, add, addAll, addAll, clear, contains, containsAll, isEmpty, remove, remove, removeAll, retainAll, set, subListclone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic static <E> List<E> of(E first, List<? extends E> rest)
public E get(int index)
public int size()
public int hashCode()
public boolean equals(Object o)
protected final List<E> toList()
toList in class AbstractImmutableList<E>@Nonnull public ListIterator<E> listIterator()
listIterator in interface List<E>listIterator in class AbstractImmutableList<E>@Nonnull public ListIterator<E> listIterator(int index)
listIterator in interface List<E>listIterator in class AbstractImmutableList<E>public int indexOf(Object o)
public int lastIndexOf(Object o)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.