Top Description Fields Constructors Methods
org.eclipse.collections.impl.stack.mutable

public final Class SynchronizedStack<T>

extends Object
implements MutableStack<T>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.stack.StackIterable, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.InternalIterable, java.lang.Iterable
Imports
java.io.Serializable, java.util.Collection, .Collections, .Comparator, .Iterator, .Map, .Optional, org.eclipse.collections.api.BooleanIterable, .ByteIterable, .CharIterable, .DoubleIterable, .FloatIterable, .IntIterable, .LazyIterable, .LongIterable, .RichIterable, .ShortIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.sorted.MutableSortedBag, org.eclipse.collections.api.bimap.MutableBiMap, org.eclipse.collections.api.block.function.Function, .Function0, .Function2, org.eclipse.collections.api.block.function.primitive.BooleanFunction, .ByteFunction, .CharFunction, .DoubleFunction, .DoubleObjectToDoubleFunction, .FloatFunction, .FloatObjectToFloatFunction, .IntFunction, .IntObjectToIntFunction, .LongFunction, .LongObjectToLongFunction, .ObjectIntToObjectFunction, .ShortFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.predicate.primitive.ObjectIntPredicate, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection, .MutableByteCollection, .MutableCharCollection, .MutableDoubleCollection, .MutableFloatCollection, .MutableIntCollection, .MutableLongCollection, .MutableShortCollection, org.eclipse.collections.api.list.ListIterable, .MutableList, org.eclipse.collections.api.map.MutableMap, .MutableMapIterable, org.eclipse.collections.api.map.primitive.MutableObjectDoubleMap, .MutableObjectLongMap, org.eclipse.collections.api.map.sorted.MutableSortedMap, org.eclipse.collections.api.multimap.MutableMultimap, org.eclipse.collections.api.multimap.list.MutableListMultimap, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.partition.stack.PartitionMutableStack, org.eclipse.collections.api.set.MutableSet, org.eclipse.collections.api.set.sorted.MutableSortedSet, org.eclipse.collections.api.stack.ImmutableStack, .MutableStack, org.eclipse.collections.api.stack.primitive.MutableBooleanStack, .MutableByteStack, .MutableCharStack, .MutableDoubleStack, .MutableFloatStack, .MutableIntStack, .MutableLongStack, .MutableShortStack, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.UnmodifiableIteratorAdapter

A synchronized view of a MutableStack. It is imperative that the user manually synchronize on the collection when iterating over it using the standard JDK iterator or JDK 5 for loop, as per Collections#synchronizedCollection(Collection).
See Also
MutableStack#asSynchronized()

Field Summary

Modifier and TypeField and Description
private final MutableStack<T>
private final Object
private static final long

Constructor Summary

AccessConstructor and Description
public
public
SynchronizedStack(MutableStack<T> newStack, Object newLock)

Method Summary

Modifier and TypeMethod and Description
public <K, V> MutableMap<K, V>
aggregateBy(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator)

Overrides default org.eclipse.collections.api.stack.MutableStack.aggregateBy.

Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.

public <K, V> MutableMap<K, V>
aggregateInPlaceBy(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator)

Overrides default org.eclipse.collections.api.stack.MutableStack.aggregateInPlaceBy.

Applies an aggregate procedure over the iterable grouping results into a Map based on the specific groupBy function.

public boolean
allSatisfy(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.RichIterable.allSatisfy.

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.eclipse.collections.api.RichIterable.allSatisfyWith.

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.eclipse.collections.api.RichIterable.anySatisfy.

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.eclipse.collections.api.RichIterable.anySatisfyWith.

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.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.RichIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyIterable<T>
asLazy()

Implements org.eclipse.collections.api.RichIterable.asLazy.

Returns a lazy (deferred) iterable, most likely implemented by calling LazyIterate.adapt(this).

public MutableStack<T>
public MutableStack<T>
public RichIterable<RichIterable<T>>
chunk(int size)

Implements org.eclipse.collections.api.RichIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableStack<V>
collect(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.stack.MutableStack.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(Function<? super T, ? extends V> function, R target)

Implements org.eclipse.collections.api.RichIterable.collect.

Same as collect(Function), except that the results are gathered into the specified target collection.

public MutableBooleanStack
collectBoolean(BooleanFunction<? super T> booleanFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectBoolean.

Returns a new primitive boolean iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableBooleanCollection> R
collectBoolean(BooleanFunction<? super T> booleanFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectBoolean.

Same as collectBoolean(BooleanFunction), except that the results are gathered into the specified target collection.

public MutableByteStack
collectByte(ByteFunction<? super T> byteFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectByte.

Returns a new primitive byte iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableByteCollection> R
collectByte(ByteFunction<? super T> byteFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectByte.

Same as collectByte(ByteFunction), except that the results are gathered into the specified target collection.

public MutableCharStack
collectChar(CharFunction<? super T> charFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectChar.

Returns a new primitive char iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableCharCollection> R
collectChar(CharFunction<? super T> charFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectChar.

Same as collectChar(CharFunction), except that the results are gathered into the specified target collection.

public MutableDoubleStack
collectDouble(DoubleFunction<? super T> doubleFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectDouble.

Returns a new primitive double iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableDoubleCollection> R
collectDouble(DoubleFunction<? super T> doubleFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectDouble.

Same as collectDouble(DoubleFunction), except that the results are gathered into the specified target collection.

public MutableFloatStack
collectFloat(FloatFunction<? super T> floatFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectFloat.

Returns a new primitive float iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableFloatCollection> R
collectFloat(FloatFunction<? super T> floatFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectFloat.

Same as collectFloat(FloatFunction), except that the results are gathered into the specified target collection.

public <V> MutableStack<V>
collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.stack.MutableStack.collectIf.

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<V>> R
collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target)

Implements org.eclipse.collections.api.RichIterable.collectIf.

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.eclipse.collections.api.stack.MutableStack.collectInt.

Returns a new primitive int iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableIntCollection> R
collectInt(IntFunction<? super T> intFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectInt.

Same as collectInt(IntFunction), except that the results are gathered into the specified target collection.

public MutableLongStack
collectLong(LongFunction<? super T> longFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectLong.

Returns a new primitive long iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableLongCollection> R
collectLong(LongFunction<? super T> longFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectLong.

Same as collectLong(LongFunction), except that the results are gathered into the specified target collection.

public MutableShortStack
collectShort(ShortFunction<? super T> shortFunction)

Implements org.eclipse.collections.api.stack.MutableStack.collectShort.

Returns a new primitive short iterable with the results of applying the specified function on each element of the source collection.

public <R extends MutableShortCollection> R
collectShort(ShortFunction<? super T> shortFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.collectShort.

Same as collectShort(ShortFunction), except that the results are gathered into the specified target collection.

public <P, V> MutableStack<V>
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter)

Implements org.eclipse.collections.api.stack.MutableStack.collectWith.

Same as collect(Function) with a Function2 and specified parameter which is passed to the block.

public <P, V, R extends Collection<V>> R
collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.collectWith.

Same as collectWith but with a targetCollection parameter to gather the results.

public <V> MutableStack<V>
collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function)

Overrides default org.eclipse.collections.api.stack.MutableStack.collectWithIndex.

Returns a new OrderedIterable using results obtained by applying the specified function to each element and its corresponding index.

public <V, R extends Collection<V>> R
collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function, R target)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.collectWithIndex.

Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.

public boolean
contains(Object object)

Implements org.eclipse.collections.api.RichIterable.contains.

Returns true if the iterable has an element which responds true to element.equals(object).

public boolean
containsAll(Collection<?> source)

Implements org.eclipse.collections.api.RichIterable.containsAll.

Returns true if all elements in source are contained in this collection.

public boolean
containsAllArguments(Object... elements)

Implements org.eclipse.collections.api.RichIterable.containsAllArguments.

Returns true if all elements in the specified var arg array are contained in this collection.

public boolean
containsAllIterable(Iterable<?> source)

Implements org.eclipse.collections.api.RichIterable.containsAllIterable.

Returns true if all elements in source are contained in this collection.

public boolean
containsAny(Collection<?> source)

Overrides default org.eclipse.collections.api.RichIterable.containsAny.

Returns true if any of the elements in source is contained in this collection.

public boolean
containsAnyIterable(Iterable<?> source)

Overrides default org.eclipse.collections.api.RichIterable.containsAnyIterable.

Returns true if any of the elements in source is contained in this collection.

public boolean
containsNone(Collection<?> source)

Overrides default org.eclipse.collections.api.RichIterable.containsNone.

Returns true if none of the elements in source are contained in this collection.

public boolean
containsNoneIterable(Iterable<?> source)

Overrides default org.eclipse.collections.api.RichIterable.containsNoneIterable.

Returns true if none of the elements in source are contained in this collection.

public <S> boolean
corresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.corresponds.

Returns true if both OrderedIterables have the same length and predicate returns true for all corresponding elements e1 of this OrderedIterable and e2 of other.

public int
count(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.RichIterable.count.

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.eclipse.collections.api.RichIterable.countWith.

Returns the total number of elements that evaluate to true for the specified predicate.

public T
detect(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.RichIterable.detect.

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.eclipse.collections.api.RichIterable.detectIfNone.

Returns the first element of the iterable for which the predicate evaluates to true.

public int
detectIndex(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.ordered.OrderedIterable.detectIndex.

Returns the index of the first element of the OrderedIterable for which the predicate evaluates to true.

public Optional<T>
detectOptional(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.RichIterable.detectOptional.

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.eclipse.collections.api.RichIterable.detectWith.

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.eclipse.collections.api.RichIterable.detectWithIfNone.

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<T>
detectWithOptional(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.RichIterable.detectWithOptional.

Returns the first element that evaluates to true for the specified predicate2 and parameter as an Optional.

public MutableStack<T>
distinct()

Implements org.eclipse.collections.api.stack.MutableStack.distinct.

Returns a new OrderedIterable containing the distinct elements in this iterable.

public MutableStack<T>
dropWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.MutableStack.dropWhile.

Returns the final elements that do not satisfy the Predicate.

public void
each(Procedure<? super T> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.stack.StackIterable.equals.

Follows the same general contract as List#equals(Object), but for Stacks.

public <V> MutableStack<V>
flatCollect(Function<? super T, ? extends Iterable<V>> function)

Implements org.eclipse.collections.api.stack.MutableStack.flatCollect.

flatCollect is a special case of collect(Function).

public <V, R extends Collection<V>> R
flatCollect(Function<? super T, ? extends Iterable<V>> function, R target)

Implements org.eclipse.collections.api.RichIterable.flatCollect.

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.eclipse.collections.api.RichIterable.flatCollectBoolean.

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.eclipse.collections.api.RichIterable.flatCollectByte.

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.eclipse.collections.api.RichIterable.flatCollectChar.

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.eclipse.collections.api.RichIterable.flatCollectDouble.

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.eclipse.collections.api.RichIterable.flatCollectFloat.

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.eclipse.collections.api.RichIterable.flatCollectInt.

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.eclipse.collections.api.RichIterable.flatCollectLong.

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.eclipse.collections.api.RichIterable.flatCollectShort.

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.eclipse.collections.api.ordered.OrderedIterable.forEach.

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.eclipse.collections.api.InternalIterable.forEachWith.

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.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex.

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.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public T
getFirst()

Overrides default org.eclipse.collections.api.stack.StackIterable.getFirst.

Should return the same value as peek().

public Optional<T>
getFirstOptional()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.getFirstOptional.

Returns the first element of an iterable as an Optional.

public T
getLast()

Implements org.eclipse.collections.api.stack.StackIterable.getLast.

Should not work as it violates the contract of a Stack.

public Optional<T>
getLastOptional()

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.getLastOptional.

Returns the last element of an iterable as an Optional.

public T
getOnly()

Overrides default org.eclipse.collections.api.RichIterable.getOnly.

Returns the element if the iterable has exactly one element.

public <V> MutableListMultimap<V, T>
groupBy(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.stack.MutableStack.groupBy.

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<V, T>> R
groupBy(Function<? super T, ? extends V> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupBy.

Same as groupBy(Function), except that the results are gathered into the specified target multimap.

public <V> MutableListMultimap<V, T>
groupByEach(Function<? super T, ? extends Iterable<V>> function)

Implements org.eclipse.collections.api.stack.MutableStack.groupByEach.

Similar to groupBy(Function), except the result of evaluating function will return a collection of keys for each value.

public <V, R extends MutableMultimap<V, T>> R
groupByEach(Function<? super T, ? extends Iterable<V>> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupByEach.

Same as groupByEach(Function), except that the results are gathered into the specified target multimap.

public <V> MutableMap<V, T>
groupByUniqueKey(Function<? super T, ? extends V> function)

Overrides default org.eclipse.collections.api.stack.MutableStack.groupByUniqueKey.

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<V, T>> R
groupByUniqueKey(Function<? super T, ? extends V> function, R target)

Implements org.eclipse.collections.api.RichIterable.groupByUniqueKey.

Same as groupByUniqueKey(Function), except that the results are gathered into the specified target map.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.stack.StackIterable.hashCode.

Follows the same general contract as List#hashCode(), but for Stacks.

public int
indexOf(Object object)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.indexOf.

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.eclipse.collections.api.RichIterable.injectInto.

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.eclipse.collections.api.RichIterable.injectInto.

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.eclipse.collections.api.RichIterable.injectInto.

Returns the final long 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.eclipse.collections.api.RichIterable.injectInto.

Returns the final float 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.eclipse.collections.api.RichIterable.injectInto.

Returns the final double result of evaluating function using each element of the iterable and the previous evaluation result as the parameters.

public <R extends Collection<T>> R
into(R target)

Implements org.eclipse.collections.api.RichIterable.into.

Adds all the elements in this iterable to the specific target Collection.

public boolean
isEmpty()

Implements org.eclipse.collections.api.RichIterable.isEmpty.

Returns true if this iterable has zero items.

public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public String
makeString()

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public String
makeString(String separator)

Overrides default org.eclipse.collections.api.RichIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public String
makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.RichIterable.makeString.

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)

Implements org.eclipse.collections.api.RichIterable.max.

Returns the maximum element out of this container based on the comparator.

public T
max()

Implements org.eclipse.collections.api.ordered.OrderedIterable.max.

Returns the maximum element out of this container based on the natural order, not the order of this container.

public <V extends Comparable<? super V>> T
maxBy(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.RichIterable.maxBy.

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)

Implements org.eclipse.collections.api.RichIterable.min.

Returns the minimum element out of this container based on the comparator.

public T
min()

Implements org.eclipse.collections.api.ordered.OrderedIterable.min.

Returns the minimum element out of this container based on the natural order, not the order of this container.

public <V extends Comparable<? super V>> T
minBy(Function<? super T, ? extends V> function)

Implements org.eclipse.collections.api.RichIterable.minBy.

Returns the minimum elements out of this container based on the natural order of the attribute returned by Function.

public boolean
noneSatisfy(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.RichIterable.noneSatisfy.

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.eclipse.collections.api.RichIterable.noneSatisfyWith.

Returns true if the predicate evaluates to false for every element of the collection, or return false.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.RichIterable.notEmpty.

The English equivalent of !this.isEmpty()

public static <T, S extends MutableStack<T>> SynchronizedStack<T>
of(S stack)

This method will take a MutableStack and wrap it directly in a SynchronizedStack.

public PartitionMutableStack<T>
partition(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.MutableStack.partition.

Filters a collection into a PartitionedIterable based on the evaluation of the predicate.

public PartitionMutableStack<T>
partitionWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.MutableStack.partitionWhile.

Returns a Partition of the initial elements that satisfy the Predicate and the remaining elements.

public <P> PartitionMutableStack<T>
partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.stack.MutableStack.partitionWith.

Filters a collection into a PartitionIterable based on the evaluation of the predicate.

public T
peek()

Implements org.eclipse.collections.api.stack.StackIterable.peek.

Returns the element at the top of the stack, without removing it from the stack.

public ListIterable<T>
public T
peekAt(int index)

Implements org.eclipse.collections.api.stack.StackIterable.peekAt.

Returns the element at a specific index, without removing it from the stack.

public T
pop()

Implements org.eclipse.collections.api.stack.MutableStack.pop.

Removes and returns the top element of the stack.

public ListIterable<T>
pop(int count)

Implements org.eclipse.collections.api.stack.MutableStack.pop.

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<T>> R
pop(int count, R targetCollection)

Implements org.eclipse.collections.api.stack.MutableStack.pop, org.eclipse.collections.api.stack.MutableStack.pop.

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<T>> R
pop(int count, R targetStack)

Implements org.eclipse.collections.api.stack.MutableStack.pop, org.eclipse.collections.api.stack.MutableStack.pop.

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.eclipse.collections.api.stack.MutableStack.push.

Adds an item to the top of the stack.

public <K> MutableMap<K, T>
reduceBy(Function<? super T, ? extends K> groupBy, Function2<? super T, ? super T, ? extends T> reduceFunction)

Overrides default org.eclipse.collections.api.stack.MutableStack.reduceBy.

Applies an aggregate function over the iterable grouping results into a map based on the specific groupBy function.

public MutableStack<T>
reject(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.MutableStack.reject.

Returns all elements of the source collection that return false when evaluating of the predicate.

public <R extends Collection<T>> R
reject(Predicate<? super T> predicate, R target)

Implements org.eclipse.collections.api.RichIterable.reject.

Same as the reject method with one parameter but uses the specified target collection for the results.

public <P> MutableStack<T>
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.stack.MutableStack.rejectWith.

Similar to reject(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public <P, R extends Collection<T>> R
rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.rejectWith.

Similar to reject(Predicate, Collection), except with an evaluation parameter for the second generic argument in Predicate2.

public <R extends Collection<T>> R
rejectWithIndex(ObjectIntPredicate<? super T> predicate, R target)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.rejectWithIndex.

Adds all elements to the target Collection that return false when evaluating the specified predicate which is supplied each element and its relative index.

public MutableStack<T>
select(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.MutableStack.select.

Returns all elements of the source collection that return true when evaluating the predicate.

public <R extends Collection<T>> R
select(Predicate<? super T> predicate, R target)

Implements org.eclipse.collections.api.RichIterable.select.

Same as the select method with one parameter but uses the specified target collection for the results.

public <S> MutableStack<S>
selectInstancesOf(Class<S> clazz)

Implements org.eclipse.collections.api.stack.MutableStack.selectInstancesOf.

Returns all elements of the source collection that are instances of the Class clazz.

public <P> MutableStack<T>
selectWith(Predicate2<? super T, ? super P> predicate, P parameter)

Implements org.eclipse.collections.api.stack.MutableStack.selectWith.

Similar to select(Predicate), except with an evaluation parameter for the second generic argument in Predicate2.

public <P, R extends Collection<T>> R
selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection)

Implements org.eclipse.collections.api.RichIterable.selectWith.

Similar to select(Predicate, Collection), except with an evaluation parameter for the second generic argument in Predicate2.

public <R extends Collection<T>> R
selectWithIndex(ObjectIntPredicate<? super T> predicate, R target)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.selectWithIndex.

Adds all elements to the target Collection that return true when evaluating the specified predicate which is supplied each element and its relative index.

public int
size()

Implements org.eclipse.collections.api.RichIterable.size.

Returns the number of items in this iterable.

public <V> MutableObjectDoubleMap<V>
sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function)

Implements org.eclipse.collections.api.stack.MutableStack.sumByDouble.

Groups and sums the values using the two specified functions.

public <V> MutableObjectDoubleMap<V>
sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function)

Implements org.eclipse.collections.api.stack.MutableStack.sumByFloat.

Groups and sums the values using the two specified functions.

public <V> MutableObjectLongMap<V>
sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function)

Implements org.eclipse.collections.api.stack.MutableStack.sumByInt.

Groups and sums the values using the two specified functions.

public <V> MutableObjectLongMap<V>
sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function)

Implements org.eclipse.collections.api.stack.MutableStack.sumByLong.

Groups and sums the values using the two specified functions.

public double
sumOfDouble(DoubleFunction<? super T> doubleFunction)

Implements org.eclipse.collections.api.RichIterable.sumOfDouble.

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.eclipse.collections.api.RichIterable.sumOfFloat.

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.eclipse.collections.api.RichIterable.sumOfInt.

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.eclipse.collections.api.RichIterable.sumOfLong.

Returns the final long result of evaluating function for each element of the iterable and adding the results together.

public MutableStack<T>
takeWhile(Predicate<? super T> predicate)

Implements org.eclipse.collections.api.stack.MutableStack.takeWhile.

Returns the initial elements that satisfy the Predicate.

public MutableStack<T>
tap(Procedure<? super T> procedure)

Implements org.eclipse.collections.api.stack.MutableStack.tap.

Executes the Procedure for each element in the iterable and returns this.

public Object[]
toArray()

Overrides default org.eclipse.collections.api.RichIterable.toArray.

Converts this iterable to an array.

public <T> T[]
toArray(T[] a)

Overrides default org.eclipse.collections.api.RichIterable.toArray.

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<T>
toBag()

Implements org.eclipse.collections.api.RichIterable.toBag.

Converts the collection to the default MutableBag implementation.

public <NK, NV> MutableBiMap<NK, NV>
toBiMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toBiMap.

Converts the collection to a BiMap implementation using the specified key and value functions.

public ImmutableStack<T>
toImmutable()

Implements org.eclipse.collections.api.stack.StackIterable.toImmutable.

Converts the StackIterable to an immutable implementation.

public MutableList<T>
toList()

Implements org.eclipse.collections.api.RichIterable.toList.

Converts the collection to a MutableList implementation.

public <NK, NV> MutableMap<NK, NV>
toMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toMap.

Converts the collection to a MutableMap implementation using the specified key and value functions.

public <NK, NV, R extends Map<NK, NV>> R
toMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction, R target)

Overrides default org.eclipse.collections.api.RichIterable.toMap.

Same as toMap(Function, Function), except that the results are gathered into the specified target map.

public MutableSet<T>
toSet()

Implements org.eclipse.collections.api.RichIterable.toSet.

Converts the collection to a MutableSet implementation.

public MutableSortedBag<T>
toSortedBag()

Implements org.eclipse.collections.api.RichIterable.toSortedBag.

Converts the collection to a MutableSortedBag implementation and sorts it using the natural order of the elements.

public MutableSortedBag<T>
toSortedBag(Comparator<? super T> comparator)

Implements org.eclipse.collections.api.RichIterable.toSortedBag.

Converts the collection to the MutableSortedBag implementation and sorts it using the specified comparator.

public MutableList<T>
toSortedList()

Overrides default org.eclipse.collections.api.RichIterable.toSortedList.

Converts the collection to a MutableList implementation and sorts it using the natural order of the elements.

public MutableList<T>
toSortedList(Comparator<? super T> comparator)

Overrides default org.eclipse.collections.api.RichIterable.toSortedList.

Converts the collection to a MutableList implementation and sorts it using the specified comparator.

public <NK, NV> MutableSortedMap<NK, NV>
toSortedMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toSortedMap.

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<NK, NV>
toSortedMap(Comparator<? super NK> comparator, Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction)

Implements org.eclipse.collections.api.RichIterable.toSortedMap.

Converts the collection to a MutableSortedMap implementation using the specified key and value functions sorted by the given comparator.

public MutableSortedSet<T>
toSortedSet()

Implements org.eclipse.collections.api.RichIterable.toSortedSet.

Converts the collection to a MutableSortedSet implementation and sorts it using the natural order of the elements.

public MutableSortedSet<T>
toSortedSet(Comparator<? super T> comparator)

Implements org.eclipse.collections.api.RichIterable.toSortedSet.

Converts the collection to a MutableSortedSet implementation and sorts it using the specified comparator.

public MutableStack<T>
toStack()

Overrides default org.eclipse.collections.api.stack.StackIterable.toStack.

Converts the stack to a MutableStack implementation.

public String
toString()

Overrides java.lang.Object.toString.

Implements org.eclipse.collections.api.stack.StackIterable.toString.

Follows the same rules as java.util.AbstractCollection#toString() except it processes the elements in the same order as forEach().

public <S, R extends Collection<Pair<T, S>>> R
zip(Iterable<S> that, R target)

Implements org.eclipse.collections.api.ordered.OrderedIterable.zip.

Same as zip(Iterable) but uses target for output.

public <S> MutableStack<Pair<T, S>>
zip(Iterable<S> that)

Implements org.eclipse.collections.api.stack.MutableStack.zip.

Returns a OrderedIterable formed from this OrderedIterable and another Iterable by combining corresponding elements in pairs.

public <R extends Collection<Pair<T, Integer>>> R
zipWithIndex(R target)

Implements org.eclipse.collections.api.ordered.OrderedIterable.zipWithIndex.

Same as zipWithIndex() but uses target for output.

public MutableStack<Pair<T, Integer>>
zipWithIndex()

Implements org.eclipse.collections.api.stack.MutableStack.zipWithIndex.

Zips this RichIterable with its indices.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait