ImmutableList which is created by calling the Lists.immutable.empty() method.
| Modifier and Type | Field and Description |
|---|---|
| private static final PartitionImmutableList | |
| pack-priv static final ImmutableList | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | allSatisfy(Predicate<? super T> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty. |
| public <P> boolean | allSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to true for every element of the collection, or returns false. |
| public boolean | anySatisfy(Predicate<? super T> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to true for any element of the iterable. |
| public <P> boolean | anySatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to true for any element of the collection, or return false. |
| public void | appendString(Appendable appendable)
Overrides default org. Prints a string representation of this collection onto the given |
| public void | appendString(Appendable appendable, String separator)
Overrides org. Overrides default org. Prints a string representation of this collection onto the given |
| public void | appendString(Appendable appendable, String start, String separator, String end)
Overrides org. Implements org. Prints a string representation of this collection onto the given |
| public <V> ImmutableList | collect(Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection. |
| public <V, R extends Collection | collect(Function<? super T, ? extends V> function, R target)
Overrides org. Implements org. Same as |
| public <V> ImmutableList | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate. |
| public <V, R extends Collection | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target)
Overrides org. Implements org. Same as the collectIf method with two parameters but uses the specified target collection for the results. |
| public <P, V, R extends Collection | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R target)
Overrides org. Implements org. Same as collectWith but with a targetCollection parameter to gather the results. |
| public boolean | contains(Object obj)
Overrides org. Implements org. Returns |
| public int | count(Predicate<? super T> predicate)
Overrides org. Implements org. Return the total number of elements that answer true to the specified predicate. |
| public <V> ImmutableBag | countBy(Function<? super T, ? extends V> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, R extends MutableBagIterable | countBy(Function<? super T, ? extends V> function, R target)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V> ImmutableBag | countByEach(Function<? super T, ? extends Iterable<V>> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, R extends MutableBagIterable | countByEach(Function<? super T, ? extends Iterable<V>> function, R target)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, P> ImmutableBag | countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument. |
| public <V, P, R extends MutableBagIterable | countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R target)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument. |
| public <P> int | countWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns the total number of elements that evaluate to true for the specified predicate. |
| public T | detect(Predicate<? super T> predicate)
Overrides org. Implements org. Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true. |
| public T | detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)
Overrides default org. Returns the first element of the iterable for which the predicate evaluates to true. |
| public Optional | detectOptional(Predicate<? super T> predicate)
Overrides org. Implements org. Returns the first element of the iterable for which the predicate evaluates to true as an Optional. |
| public ImmutableList | drop(int count)
Overrides org. Implements org. Returns an iterable after skipping the first |
| public ImmutableList | dropWhile(Predicate<? super T> predicate)
Overrides org. Implements org. Returns the final elements that do not satisfy the Predicate. |
| public void | each(Procedure<? super T> procedure)
Implements org. The procedure is executed for each element in the iterable. |
| public boolean | equals(Object otherList)
Overrides org. Implements org. Compares the specified object with this list for equality. |
| public <V> ImmutableList | flatCollect(Function<? super T, ? extends Iterable<V>> function)
Overrides org. Implements org.
|
| public <V, R extends Collection | flatCollect(Function<? super T, ? extends Iterable<V>> function, R targetCollection)
Overrides org. Implements org. Same as flatCollect, only the results are collected into the target collection. |
| public <P> void | forEachWith(Procedure2<? super T, ? super P> procedure, P parameter)
Overrides org. Implements org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. |
| public void | forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
Overrides org. Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. |
| public T | get(int index)
Implements org. Returns the element at the specified position in this list. |
| public T | getFirst()
Overrides org. Overrides default java. Implements org. Gets the first element of this collection. |
| public T | getLast()
Overrides org. Overrides default java. Implements org. Gets the last element of this collection. |
| public T | getOnly()
Overrides default org. Returns the element if the iterable has exactly one element. |
| public int | hashCode()
Overrides org. Implements org. Returns the hash code value for this list. |
| public <IV> IV | injectInto(IV injectedValue, Function2<? super IV, ? super T, ? extends IV> function)
Overrides org. Implements org. Returns the final result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public int | injectInto(int injectedValue, IntObjectToIntFunction<? super T> intObjectToIntFunction)
Overrides org. Implements org. Returns the final int result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public long | injectInto(long injectedValue, LongObjectToLongFunction<? super T> longObjectToLongFunction)
Overrides org. Implements org. Returns the final long result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public double | injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super T> doubleObjectToDoubleFunction)
Overrides org. Implements org. Returns the final double result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public boolean | isEmpty()
Overrides org. Implements org. Returns |
| public String | makeString()
Overrides default org. Returns a string representation of this collection by delegating to |
| public String | makeString(String separator)
Overrides default org. Returns a string representation of this collection by delegating to |
| public String | makeString(String start, String separator, String end)
Overrides default org. Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings. |
| public T | max(Comparator<? super T> comparator)
Overrides org. Implements org. Returns the maximum element out of this container based on the comparator. |
| public T | max()
Overrides org. Implements org. Returns the maximum element out of this container based on the natural order. |
| public <V extends Comparable | maxBy(Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns the maximum elements out of this container based on the natural order of the attribute returned by Function. |
| public T | min(Comparator<? super T> comparator)
Overrides org. Implements org. Returns the minimum element out of this container based on the comparator. |
| public T | min()
Overrides org. Implements org. Returns the minimum element out of this container based on the natural order. |
| public <V extends Comparable | minBy(Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns the minimum elements out of this container based on the natural order of the attribute returned by Function. |
| public ImmutableList | newWith(T newItem)
Implements org. This method is similar to the |
| public ImmutableList | newWithout(T element)
Overrides org. Implements org. This method is similar to the |
| public ImmutableList | newWithoutAll(Iterable<? extends T> elements)
Overrides org. Implements org. This method is similar to the |
| public boolean | noneSatisfy(Predicate<? super T> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty. |
| public <P> boolean | noneSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to false for every element of the collection, or return false. |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| public PartitionImmutableList | partition(Predicate<? super T> predicate)
Overrides org. Implements org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public PartitionImmutableList | partitionWhile(Predicate<? super T> predicate)
Overrides org. Implements org. Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements. |
| private Object | |
| public ImmutableList | reject(Predicate<? super T> predicate)
Overrides org. Implements org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <R extends Collection | reject(Predicate<? super T> predicate, R target)
Overrides org. Implements org. Same as the reject method with one parameter but uses the specified target collection for the results. |
| public <P, R extends Collection | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target)
Overrides org. Implements org. Similar to |
| public void | reverseForEach(Procedure<? super T> procedure)
Overrides default org. Evaluates the procedure for each element of the list iterating in reverse order. |
| public void | reverseForEachWithIndex(ObjectIntProcedure<? super T> procedure)
Overrides default org. Evaluates the procedure for each element and it's index in reverse order. |
| public ImmutableList | select(Predicate<? super T> predicate)
Overrides org. Implements org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <R extends Collection | select(Predicate<? super T> predicate, R target)
Overrides org. Implements org. Same as the select method with one parameter but uses the specified target collection for the results. |
| public <P, R extends Collection | selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target)
Overrides org. Implements org. Similar to |
| public int | size()
Implements org. Returns the number of elements in this list. |
| public ImmutableList | take(int count)
Overrides org. Implements org. Returns the first |
| public ImmutableList | takeWhile(Predicate<? super T> predicate)
Overrides org. Implements org. Returns the initial elements that satisfy the Predicate. |
| public ImmutableList | tap(Procedure<? super T> procedure)
Overrides org. Implements org. Executes the Procedure for each element in the iterable and returns |
| public MutableStack | toStack()
Overrides default org. Converts the OrderedIterable to a mutable MutableStack implementation. |
| public String | toString()
Overrides org. Implements org. Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets. |
| public <S> ImmutableList | zip(Iterable<S> that)
Overrides org. Implements org. Returns a |
| public <S, R extends Collection | zip(Iterable<S> that, R target)
Overrides org. Implements org. Same as |
| public ImmutableList | zipWithIndex()
Overrides org. Implements org. Zips this |
| public <R extends Collection | zipWithIndex(R target)
Overrides org. Implements org. Same as |