| Modifier and Type | Field and Description |
|---|---|
| private MutableList | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | allSatisfy(Predicate<? super T> predicate)
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)
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)
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)
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 default org. Prints a string representation of this collection onto the given |
| public void | appendString(Appendable appendable, String start, String separator, String end)
Implements org. Prints a string representation of this collection onto the given |
| public LazyIterable | asLazy()
Implements org. Returns a lazy (deferred) iterable, most likely implemented by calling LazyIterate.adapt(this). |
| public MutableStack | |
| public MutableStack | |
| private void | |
| private void | |
| private void | |
| private void | |
| private boolean | |
| public RichIterable | chunk(int size)
Implements org. Partitions elements in fixed size chunks. |
| public void | |
| public <V> ArrayStack | collect(Function<? super T, ? extends V> function)
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)
Implements org. Same as |
| public MutableBooleanStack | collectBoolean(BooleanFunction<? super T> booleanFunction)
Implements org. Returns a new primitive |
| public <R extends MutableBooleanCollection> R | collectBoolean(BooleanFunction<? super T> booleanFunction, R target)
Overrides default org. Same as |
| public MutableByteStack | collectByte(ByteFunction<? super T> byteFunction)
Implements org. Returns a new primitive |
| public <R extends MutableByteCollection> R | collectByte(ByteFunction<? super T> byteFunction, R target)
Overrides default org. Same as |
| public MutableCharStack | collectChar(CharFunction<? super T> charFunction)
Implements org. Returns a new primitive |
| public <R extends MutableCharCollection> R | collectChar(CharFunction<? super T> charFunction, R target)
Overrides default org. Same as |
| public MutableDoubleStack | collectDouble(DoubleFunction<? super T> doubleFunction)
Implements org. Returns a new primitive |
| public <R extends MutableDoubleCollection> R | collectDouble(DoubleFunction<? super T> doubleFunction, R target)
Overrides default org. Same as |
| public MutableFloatStack | collectFloat(FloatFunction<? super T> floatFunction)
Implements org. Returns a new primitive |
| public <R extends MutableFloatCollection> R | collectFloat(FloatFunction<? super T> floatFunction, R target)
Overrides default org. Same as |
| public <V> ArrayStack | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)
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)
Implements org. Same as the collectIf method with two parameters but uses the specified target collection for the results. |
| public MutableIntStack | collectInt(IntFunction<? super T> intFunction)
Implements org. Returns a new primitive |
| public <R extends MutableIntCollection> R | collectInt(IntFunction<? super T> intFunction, R target)
Overrides default org. Same as |
| public MutableLongStack | collectLong(LongFunction<? super T> longFunction)
Implements org. Returns a new primitive |
| public <R extends MutableLongCollection> R | collectLong(LongFunction<? super T> longFunction, R target)
Overrides default org. Same as |
| public MutableShortStack | collectShort(ShortFunction<? super T> shortFunction)
Implements org. Returns a new primitive |
| public <R extends MutableShortCollection> R | collectShort(ShortFunction<? super T> shortFunction, R target)
Overrides default org. Same as |
| public <P, V> ArrayStack | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Implements org. Same as |
| public <P, V, R extends Collection | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R targetCollection)
Implements org. Same as collectWith but with a targetCollection parameter to gather the results. |
| public boolean | contains(Object object)
Implements org. Returns true if the iterable has an element which responds true to element.equals(object). |
| public boolean | containsAll(Collection<?> source)
Implements org. Returns true if all elements in source are contained in this collection. |
| public boolean | containsAllArguments(Object... elements)
Implements org. Returns true if all elements in the specified var arg array are contained in this collection. |
| public boolean | containsAllIterable(Iterable<?> source)
Implements org. Returns true if all elements in source are contained in this collection. |
| public <S> boolean | corresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate)
Implements org. Returns true if both OrderedIterables have the same length
and |
| public int | count(Predicate<? super T> predicate)
Implements org. Return the total number of elements that answer true to the specified predicate. |
| public <P> int | countWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Returns the total number of elements that evaluate to true for the specified predicate. |
| public T | detect(Predicate<? super T> predicate)
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 int | detectIndex(Predicate<? super T> predicate)
Implements org. Returns the index of the first element of the |
| public Optional | detectOptional(Predicate<? super T> predicate)
Implements org. Returns the first element of the iterable for which the predicate evaluates to true as an Optional. |
| public <P> T | detectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Returns the first element that evaluates to true for the specified predicate2 and parameter, or null if none evaluate to true. |
| public <P> T | detectWithIfNone(Predicate2<? super T, ? super P> predicate, P parameter, Function0<? extends T> function)
Implements org. Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter, or returns the value of evaluating the specified function. |
| public <P> Optional | detectWithOptional(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Returns the first element that evaluates to true for the specified predicate2 and parameter as an Optional. |
| public MutableStack | distinct()
Implements org. Returns a new |
| public MutableStack | dropWhile(Predicate<? super T> predicate)
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 o)
Overrides java. Implements org. Follows the same general contract as |
| public <V> ArrayStack | flatCollect(Function<? super T, ? extends Iterable<V>> function)
Implements org.
|
| public <V, R extends Collection | flatCollect(Function<? super T, ? extends Iterable<V>> function, R target)
Implements org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableBooleanCollection> R | flatCollectBoolean(Function<? super T, ? extends BooleanIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableByteCollection> R | flatCollectByte(Function<? super T, ? extends ByteIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableCharCollection> R | flatCollectChar(Function<? super T, ? extends CharIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableDoubleCollection> R | flatCollectDouble(Function<? super T, ? extends DoubleIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableFloatCollection> R | flatCollectFloat(Function<? super T, ? extends FloatIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableIntCollection> R | flatCollectInt(Function<? super T, ? extends IntIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableLongCollection> R | flatCollectLong(Function<? super T, ? extends LongIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public <R extends MutableShortCollection> R | flatCollectShort(Function<? super T, ? extends ShortIterable> function, R target)
Overrides default org. Same as flatCollect, only the results are collected into the target collection. |
| public void | forEach(int startIndex, int endIndex, Procedure<? super T> procedure)
Implements org. Iterates over the section of the iterable covered by the specified inclusive indexes. |
| public <P> void | forEachWith(Procedure2<? super T, ? super P> procedure, P parameter)
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)
Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure e.g.
people.forEachWithIndex((person, index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
|
| public void | forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)
Implements org. Iterates over the section of the iterable covered by the specified inclusive indexes. |
| public T | getFirst()
Overrides default org. Should return the same value as peek(). |
| public T | getLast()
Implements org. Should not work as it violates the contract of a Stack. |
| public T | getOnly()
Overrides default org. Returns the element if the iterable has exactly one element. |
| public <V> MutableListMultimap | groupBy(Function<? super T, ? extends V> function)
Implements org. For each element of the iterable, the function is evaluated and the results of these evaluations are collected into a new multimap, where the transformed value is the key and the original values are added to the same (or similar) species of collection as the source iterable. |
| public <V, R extends MutableMultimap | groupBy(Function<? super T, ? extends V> function, R target)
Implements org. Same as |
| public <V> MutableListMultimap | groupByEach(Function<? super T, ? extends Iterable<V>> function)
Implements org. Similar to |
| public <V, R extends MutableMultimap | groupByEach(Function<? super T, ? extends Iterable<V>> function, R target)
Implements org. Same as |
| public <V> MutableMap | groupByUniqueKey(Function<? super T, ? extends V> function)
Overrides default org. For each element of the iterable, the function is evaluated, and the results of these evaluations are collected into a new map, where the transformed value is the key. |
| public <V, R extends MutableMapIterable | groupByUniqueKey(Function<? super T, ? extends V> function, R target)
Implements org. Same as |
| public int | hashCode()
Overrides java. Implements org. Follows the same general contract as |
| public boolean | |
| public int | indexOf(Object object)
Overrides default org. Returns the index of the first occurrence of the specified item in this iterable, or -1 if this iterable does not contain the item. |
| public <IV> IV | injectInto(IV injectedValue, Function2<? super IV, ? super T, ? extends IV> function)
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)
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)
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)
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 float | injectInto(float injectedValue, FloatObjectToFloatFunction<? super T> floatObjectToFloatFunction)
Implements org. Returns the final float result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public <R extends Collection | into(R target)
Implements org. Adds all the elements in this iterable to the specific target Collection. |
| public boolean | isEmpty()
Implements org. Returns true if this iterable has zero items. |
| public Iterator | |
| 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()
Implements org. Returns the maximum element out of this container based on the natural order, not the order of this container. |
| public T | max(Comparator<? super T> comparator)
Implements org. Returns the maximum element out of this container based on the comparator. |
| public <V extends Comparable | maxBy(Function<? super T, ? extends V> function)
Implements org. Returns the maximum elements out of this container based on the natural order of the attribute returned by Function. |
| public T | min()
Implements org. Returns the minimum element out of this container based on the natural order, not the order of this container. |
| public T | min(Comparator<? super T> comparator)
Implements org. Returns the minimum element out of this container based on the comparator. |
| public <V extends Comparable | minBy(Function<? super T, ? extends V> function)
Implements org. Returns the minimum elements out of this container based on the natural order of the attribute returned by Function. |
| public static <T> ArrayStack | |
| public static <T> ArrayStack | |
| public static <T> ArrayStack | |
| public static <T> ArrayStack | |
| public static <T> ArrayStack | |
| public boolean | noneSatisfy(Predicate<? super T> predicate)
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)
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 PartitionMutableStack | partition(Predicate<? super T> predicate)
Implements org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public PartitionMutableStack | partitionWhile(Predicate<? super T> predicate)
Implements org. Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements. |
| public <P> PartitionMutableStack | partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Filters a collection into a PartitionIterable based on the evaluation of the predicate. |
| public T | peek()
Implements org. Returns the element at the top of the stack, without removing it from the stack. |
| public ListIterable | |
| public T | peekAt(int index)
Implements org. Returns the element at a specific index, without removing it from the stack. |
| public T | pop()
Implements org. Removes and returns the top element of the stack. |
| public ListIterable | pop(int count)
Implements org. Removes and returns a ListIterable of the number of elements specified by the count, beginning with the top of the stack. |
| public <R extends Collection | pop(int count, R targetCollection)
Implements org. Removes and returns a ListIterable of the number of elements specified by the count, beginning with the top of the stack and puts them into the targeted collection type. |
| public <R extends MutableStack | pop(int count, R targetStack)
Implements org. Removes and returns a ListIterable of the number of elements specified by the count, beginning with the top of the stack and puts them into the targeted collection type. |
| public void | push(T item)
Implements org. Adds an item to the top of the stack. |
| public void | readExternal(ObjectInput in)
Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public ArrayStack | reject(Predicate<? super T> predicate)
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)
Implements org. Same as the reject method with one parameter but uses the specified target collection for the results. |
| public <P> ArrayStack | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Similar to |
| public <P, R extends Collection | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection)
Implements org. Similar to |
| public ArrayStack | select(Predicate<? super T> predicate)
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)
Implements org. Same as the select method with one parameter but uses the specified target collection for the results. |
| public <S> ArrayStack | selectInstancesOf(Class<S> clazz)
Implements org. Returns all elements of the source collection that are instances of the Class |
| public <P> ArrayStack | selectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Implements org. Similar to |
| public <P, R extends Collection | selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection)
Implements org. Similar to |
| public int | size()
Implements org. Returns the number of items in this iterable. |
| public <V> MutableObjectDoubleMap | sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V> MutableObjectDoubleMap | sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V> MutableObjectLongMap | sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public <V> MutableObjectLongMap | sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function)
Implements org. Groups and sums the values using the two specified functions. |
| public double | sumOfDouble(DoubleFunction<? super T> doubleFunction)
Implements org. Returns the final double result of evaluating function for each element of the iterable and adding the results together. |
| public double | sumOfFloat(FloatFunction<? super T> floatFunction)
Implements org. Returns the final double result of evaluating function for each element of the iterable and adding the results together. |
| public long | sumOfInt(IntFunction<? super T> intFunction)
Implements org. Returns the final long result of evaluating function for each element of the iterable and adding the results together. |
| public long | sumOfLong(LongFunction<? super T> longFunction)
Implements org. Returns the final long result of evaluating function for each element of the iterable and adding the results together. |
| public MutableStack | takeWhile(Predicate<? super T> predicate)
Implements org. Returns the initial elements that satisfy the Predicate. |
| public ArrayStack | tap(Procedure<? super T> procedure)
Implements org. Executes the Procedure for each element in the iterable and returns |
| public Object[] | toArray()
Overrides default org. Converts this iterable to an array. |
| public <T> T[] | toArray(T[] a)
Overrides default org. Converts this iterable to an array using the specified target array, assuming the target array is as long or longer than the iterable. |
| public MutableBag | toBag()
Implements org. Converts the collection to the default MutableBag implementation. |
| public <NK, NV> MutableBiMap | toBiMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)
Implements org. Converts the collection to a BiMap implementation using the specified key and value functions. |
| public ImmutableStack | toImmutable()
Implements org. Converts the StackIterable to an immutable implementation. |
| public MutableList | toList()
Implements org. Converts the collection to a MutableList implementation. |
| public <NK, NV> MutableMap | toMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)
Implements org. Converts the collection to a MutableMap implementation using the specified key and value functions. |
| public <NK, NV, R extends Map | toMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction, R target)
Overrides default org. Same as |
| public MutableSet | toSet()
Implements org. Converts the collection to a MutableSet implementation. |
| public MutableSortedBag | toSortedBag()
Implements org. Converts the collection to a MutableSortedBag implementation and sorts it using the natural order of the elements. |
| public MutableSortedBag | toSortedBag(Comparator<? super T> comparator)
Implements org. Converts the collection to the MutableSortedBag implementation and sorts it using the specified comparator. |
| public MutableList | toSortedList()
Overrides default org. Converts the collection to a MutableList implementation and sorts it using the natural order of the elements. |
| public MutableList | toSortedList(Comparator<? super T> comparator)
Overrides default org. Converts the collection to a MutableList implementation and sorts it using the specified comparator. |
| public <NK, NV> MutableSortedMap | toSortedMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)
Implements org. Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the key elements' natural ordering. |
| public <NK, NV> MutableSortedMap | toSortedMap(Comparator<? super NK> comparator, Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)
Implements org. Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the given comparator. |
| public <KK extends Comparable | toSortedMapBy(Function<? super NK, KK> sortBy, Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)
Overrides default org. Converts the collection to a MutableSortedMap implementation using the specified key and value functions
and sorts it based on the natural order of the attribute returned by |
| public MutableSortedSet | toSortedSet()
Implements org. Converts the collection to a MutableSortedSet implementation and sorts it using the natural order of the elements. |
| public MutableSortedSet | toSortedSet(Comparator<? super T> comparator)
Implements org. Converts the collection to a MutableSortedSet implementation and sorts it using the specified comparator. |
| public String | toString()
Overrides java. Implements org. Follows the same rules as |
| public void | writeExternal(ObjectOutput out)
Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| public <S> ArrayStack | zip(Iterable<S> that)
Implements org. Returns a |
| public <S, R extends Collection | zip(Iterable<S> that, R target)
Implements org. Same as |
| public ArrayStack | zipWithIndex()
Implements org. Zips this |
| public <R extends Collection | zipWithIndex(R target)
Implements org. Same as |