| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| element1 | back to summary |
|---|---|
| private final T element1 | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ImmutableSingletonList | back to summary |
|---|---|
| pack-priv ImmutableSingletonList(T obj1) | |
| contains | back to summary |
|---|---|
| public boolean contains(Object obj) Overrides org. Implements org. Doc from java. Returns
| |
| each | back to summary |
|---|---|
| public void each(Procedure<? super T> procedure) Implements org. Doc from org. The procedure is executed for each element in the iterable. Example using a Java 8 lambda expression: people.each(person -> LOGGER.info(person.getName()));This method is a variant of InternalIterable#forEach(Procedure)
that has a signature conflict with Iterable#forEach(java..
| |
| get | back to summary |
|---|---|
| public T get(int index) Implements org. Doc from java. Returns the element at the specified position in this list.
| |
| getFirst | back to summary |
|---|---|
| public T getFirst() Overrides org. Overrides default java. Implements org. Doc from java. Gets the first element of this collection.
| |
| getLast | back to summary |
|---|---|
| public T getLast() Overrides org. Overrides default java. Implements org. Doc from java. Gets the last element of this collection.
| |
| getOnly | back to summary |
|---|---|
| public T getOnly() Overrides default org. Doc from org. Returns the element if the iterable has exactly one element. Otherwise, throw
| |
| newWith | back to summary |
|---|---|
| public ImmutableList Implements org. Doc from org. This method is similar to the
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| toReversed | back to summary |
|---|---|
| public ImmutableList Overrides org. Implements org. Doc from org. Returns a new ReversibleIterable in reverse order.
| |