| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| EmptyList | back to summary |
|---|---|
| pack-priv EmptyList() | |
| clone | back to summary |
|---|---|
| public EmptyList Overrides org. Implements org. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| contains | back to summary |
|---|---|
| public boolean contains(Object obj) Overrides org. Implements java. Doc from java. Returns
| |
| each | back to summary |
|---|---|
| public void each(Procedure<? super T> procedure) Overrides org. 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..
| |
| forEachWith | back to summary |
|---|---|
| public <P> void forEachWith(Procedure2<? super T, ? super P> procedure, P parameter) Overrides org. Implements org. Doc from org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) ->
{
if (person.isRelatedTo(other))
{
LOGGER.info(person.getName());
}
}, fred);
Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>()
{
public void value(Person person, Person other)
{
if (person.isRelatedTo(other))
{
LOGGER.info(person.getName());
}
}
}, fred);
| |
| forEachWithIndex | back to summary |
|---|---|
| public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) Overrides org. Implements org. Doc from org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>()
{
public void value(Person person, int index)
{
LOGGER.info("Index: " + index + " person: " + person.getName());
}
});
| |
| get | back to summary |
|---|---|
| public T get(int index) Implements java. Doc from java. Returns the element at the specified position in this list.
| |
| getFirst | back to summary |
|---|---|
| public T getFirst() Overrides org. Overrides default org. Implements org. Doc from org. This default override exists because java.util.List added a default getFirst() method in Java 21.
| |
| getLast | back to summary |
|---|---|
| public T getLast() Overrides org. Overrides default org. Implements org. Doc from org. This default override exists because java.util.List added a default getLast() method in Java 21.
| |
| 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
| |
| iterator | back to summary |
|---|---|
| public Iterator Overrides org. Implements java. Doc from java. Returns an iterator over the elements in this list in proper sequence.
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Overrides org. Implements java. Doc from java. Returns a list iterator over the elements in this list (in proper sequence).
| |
| listIterator | back to summary |
|---|---|
| public ListIterator Overrides org. Implements java. Doc from java. Returns a list iterator over the elements in this list (in proper
sequence), starting at the specified position in the list.
The specified index indicates the first element that would be
returned by an initial call to
| |
| max | back to summary |
|---|---|
| public T max(Comparator<? super T> comparator) Overrides org. Implements org. Doc from org. Returns the maximum element out of this container based on the comparator.
| |
| max | back to summary |
|---|---|
| public T max() Overrides org. Implements org. Doc from org. Returns the maximum element out of this container based on the natural order.
| |
| maxBy | back to summary |
|---|---|
| public <V extends Comparable Overrides org. Implements org. Doc from org. Returns the maximum elements out of this container based on the natural order of the attribute returned by Function.
| |
| min | back to summary |
|---|---|
| public T min(Comparator<? super T> comparator) Overrides org. Implements org. Doc from org. Returns the minimum element out of this container based on the comparator.
| |
| min | back to summary |
|---|---|
| public T min() Overrides org. Implements org. Doc from org. Returns the minimum element out of this container based on the natural order.
| |
| minBy | back to summary |
|---|---|
| public <V extends Comparable Overrides org. Implements org. Doc from org. Returns the minimum elements out of this container based on the natural order of the attribute returned by Function.
| |
| readResolve | back to summary |
|---|---|
| private Object readResolve() | |
| replaceAll | back to summary |
|---|---|
| public void replaceAll(UnaryOperator<T> operator) Overrides default java. Doc from java. Replaces each element of this list with the result of applying the operator to that element (optional operation). Errors or runtime exceptions thrown by the operator are relayed to the caller.
| |
| set | back to summary |
|---|---|
| public T set(int index, T element) Implements java. Doc from java. Replaces the element at the specified position in this list with the specified element (optional operation).
| |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
| |
| sort | back to summary |
|---|---|
| public void sort(Comparator<? super T> comparator) Overrides org. Overrides default java. Doc from org. This method checks if comparator is null and use a ComparableComparator if it is.
| |
| sortThis | back to summary |
|---|---|
| public EmptyList Overrides default org. Doc from org. Sorts the internal data structure of this list and returns the list itself as a convenience.
| |
| sortThisBy | back to summary |
|---|---|
| public <V extends Comparable Overrides default org. Doc from org. Sorts the internal data structure of this list based on the natural order of the attribute returned by
| |
| sortThisByBoolean | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByByte | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByChar | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByDouble | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByFloat | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByInt | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByLong | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| sortThisByShort | back to summary |
|---|---|
| public MutableList Overrides org. Implements org.
| |
| toImmutable | back to summary |
|---|---|
| public ImmutableList Overrides default org. Implements org. Doc from org. Returns an immutable copy of this list. If the list is immutable, it returns itself.
| |
| with | back to summary |
|---|---|
| public SingletonList Overrides default org. Implements org. Doc from org. This method allows fixed size collections the ability to add elements to their existing elements. A new instance
of
MutableCollection<String> list;
list = list.with("1");
list = list.with("2");
return list;
| |
| zip | back to summary |
|---|---|
| public <S> MutableList Overrides org. Implements org. Doc from org. Returns a
| |
| zipWithIndex | back to summary |
|---|---|
| public MutableList Overrides org. Implements org. Doc from org. Zips this
| |