Class UnmodifiableStack<T>
- java.lang.Object
-
- org.eclipse.collections.impl.stack.mutable.UnmodifiableStack<T>
-
- All Implemented Interfaces:
Serializable
,Iterable<T>
,InternalIterable<T>
,OrderedIterable<T>
,RichIterable<T>
,MutableStack<T>
,StackIterable<T>
public final class UnmodifiableStack<T> extends Object implements MutableStack<T>, Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(Predicate<? super T> predicate)
<P> boolean
allSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
boolean
anySatisfy(Predicate<? super T> predicate)
<P> boolean
anySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
void
appendString(Appendable appendable)
void
appendString(Appendable appendable, String separator)
void
appendString(Appendable appendable, String start, String separator, String end)
LazyIterable<T>
asLazy()
MutableStack<T>
asSynchronized()
MutableStack<T>
asUnmodifiable()
RichIterable<RichIterable<T>>
chunk(int size)
void
clear()
<V> MutableStack<V>
collect(Function<? super T,? extends V> function)
<V,R extends Collection<V>>
Rcollect(Function<? super T,? extends V> function, R target)
MutableBooleanStack
collectBoolean(BooleanFunction<? super T> booleanFunction)
<R extends MutableBooleanCollection>
RcollectBoolean(BooleanFunction<? super T> booleanFunction, R target)
MutableByteStack
collectByte(ByteFunction<? super T> byteFunction)
<R extends MutableByteCollection>
RcollectByte(ByteFunction<? super T> byteFunction, R target)
MutableCharStack
collectChar(CharFunction<? super T> charFunction)
<R extends MutableCharCollection>
RcollectChar(CharFunction<? super T> charFunction, R target)
MutableDoubleStack
collectDouble(DoubleFunction<? super T> doubleFunction)
<R extends MutableDoubleCollection>
RcollectDouble(DoubleFunction<? super T> doubleFunction, R target)
MutableFloatStack
collectFloat(FloatFunction<? super T> floatFunction)
<R extends MutableFloatCollection>
RcollectFloat(FloatFunction<? super T> floatFunction, R target)
<V> MutableStack<V>
collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
<V,R extends Collection<V>>
RcollectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function, R target)
MutableIntStack
collectInt(IntFunction<? super T> intFunction)
<R extends MutableIntCollection>
RcollectInt(IntFunction<? super T> intFunction, R target)
MutableLongStack
collectLong(LongFunction<? super T> longFunction)
<R extends MutableLongCollection>
RcollectLong(LongFunction<? super T> longFunction, R target)
MutableShortStack
collectShort(ShortFunction<? super T> shortFunction)
<R extends MutableShortCollection>
RcollectShort(ShortFunction<? super T> shortFunction, R target)
<P,V>
MutableStack<V>collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
<P,V,R extends Collection<V>>
RcollectWith(Function2<? super T,? super P,? extends V> function, P parameter, R targetCollection)
<V> MutableStack<V>
collectWithIndex(ObjectIntToObjectFunction<? super T,? extends V> function)
boolean
contains(Object object)
boolean
containsAll(Collection<?> source)
boolean
containsAllArguments(Object... elements)
boolean
containsAllIterable(Iterable<?> source)
<S> boolean
corresponds(OrderedIterable<S> other, Predicate2<? super T,? super S> predicate)
int
count(Predicate<? super T> predicate)
<P> int
countWith(Predicate2<? super T,? super P> predicate, P parameter)
T
detect(Predicate<? super T> predicate)
T
detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)
int
detectIndex(Predicate<? super T> predicate)
Optional<T>
detectOptional(Predicate<? super T> predicate)
<P> T
detectWith(Predicate2<? super T,? super P> predicate, P parameter)
<P> T
detectWithIfNone(Predicate2<? super T,? super P> predicate, P parameter, Function0<? extends T> function)
<P> Optional<T>
detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)
MutableStack<T>
distinct()
MutableStack<T>
dropWhile(Predicate<? super T> predicate)
void
each(Procedure<? super T> procedure)
boolean
equals(Object obj)
<V> MutableStack<V>
flatCollect(Function<? super T,? extends Iterable<V>> function)
<V,R extends Collection<V>>
RflatCollect(Function<? super T,? extends Iterable<V>> function, R target)
<R extends MutableBooleanCollection>
RflatCollectBoolean(Function<? super T,? extends BooleanIterable> function, R target)
<R extends MutableByteCollection>
RflatCollectByte(Function<? super T,? extends ByteIterable> function, R target)
<R extends MutableCharCollection>
RflatCollectChar(Function<? super T,? extends CharIterable> function, R target)
<R extends MutableDoubleCollection>
RflatCollectDouble(Function<? super T,? extends DoubleIterable> function, R target)
<R extends MutableFloatCollection>
RflatCollectFloat(Function<? super T,? extends FloatIterable> function, R target)
<R extends MutableIntCollection>
RflatCollectInt(Function<? super T,? extends IntIterable> function, R target)
<R extends MutableLongCollection>
RflatCollectLong(Function<? super T,? extends LongIterable> function, R target)
<R extends MutableShortCollection>
RflatCollectShort(Function<? super T,? extends ShortIterable> function, R target)
void
forEach(int startIndex, int endIndex, Procedure<? super T> procedure)
<P> void
forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
void
forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)
void
forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
T
getFirst()
T
getLast()
T
getOnly()
<V> MutableListMultimap<V,T>
groupBy(Function<? super T,? extends V> function)
<V,R extends MutableMultimap<V,T>>
RgroupBy(Function<? super T,? extends V> function, R target)
<V> MutableListMultimap<V,T>
groupByEach(Function<? super T,? extends Iterable<V>> function)
<V,R extends MutableMultimap<V,T>>
RgroupByEach(Function<? super T,? extends Iterable<V>> function, R target)
<V> MutableMap<V,T>
groupByUniqueKey(Function<? super T,? extends V> function)
<V,R extends MutableMapIterable<V,T>>
RgroupByUniqueKey(Function<? super T,? extends V> function, R target)
int
hashCode()
int
indexOf(Object object)
double
injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super T> doubleObjectToDoubleFunction)
float
injectInto(float injectedValue, FloatObjectToFloatFunction<? super T> floatObjectToFloatFunction)
int
injectInto(int injectedValue, IntObjectToIntFunction<? super T> intObjectToIntFunction)
long
injectInto(long injectedValue, LongObjectToLongFunction<? super T> longObjectToLongFunction)
<IV> IV
injectInto(IV injectedValue, Function2<? super IV,? super T,? extends IV> function)
<R extends Collection<T>>
Rinto(R target)
boolean
isEmpty()
Iterator<T>
iterator()
String
makeString()
String
makeString(String separator)
String
makeString(String start, String separator, String end)
T
max()
T
max(Comparator<? super T> comparator)
<V extends Comparable<? super V>>
TmaxBy(Function<? super T,? extends V> function)
T
min()
T
min(Comparator<? super T> comparator)
<V extends Comparable<? super V>>
TminBy(Function<? super T,? extends V> function)
boolean
noneSatisfy(Predicate<? super T> predicate)
<P> boolean
noneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
boolean
notEmpty()
static <T,S extends MutableStack<T>>
UnmodifiableStack<T>of(S stack)
PartitionMutableStack<T>
partition(Predicate<? super T> predicate)
PartitionMutableStack<T>
partitionWhile(Predicate<? super T> predicate)
<P> PartitionMutableStack<T>
partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
T
peek()
ListIterable<T>
peek(int count)
T
peekAt(int index)
T
pop()
ListIterable<T>
pop(int count)
<R extends Collection<T>>
Rpop(int count, R targetCollection)
void
push(T item)
MutableStack<T>
reject(Predicate<? super T> predicate)
<R extends Collection<T>>
Rreject(Predicate<? super T> predicate, R target)
<P> MutableStack<T>
rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
<P,R extends Collection<T>>
RrejectWith(Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
MutableStack<T>
select(Predicate<? super T> predicate)
<R extends Collection<T>>
Rselect(Predicate<? super T> predicate, R target)
<S> MutableStack<S>
selectInstancesOf(Class<S> clazz)
<P> MutableStack<T>
selectWith(Predicate2<? super T,? super P> predicate, P parameter)
<P,R extends Collection<T>>
RselectWith(Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
int
size()
<V> MutableObjectDoubleMap<V>
sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
<V> MutableObjectDoubleMap<V>
sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
<V> MutableObjectLongMap<V>
sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
<V> MutableObjectLongMap<V>
sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
double
sumOfDouble(DoubleFunction<? super T> doubleFunction)
double
sumOfFloat(FloatFunction<? super T> floatFunction)
long
sumOfInt(IntFunction<? super T> intFunction)
long
sumOfLong(LongFunction<? super T> longFunction)
MutableStack<T>
takeWhile(Predicate<? super T> predicate)
MutableStack<T>
tap(Procedure<? super T> procedure)
Object[]
toArray()
<T> T[]
toArray(T[] a)
MutableBag<T>
toBag()
<NK,NV>
MutableBiMap<NK,NV>toBiMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
ImmutableStack<T>
toImmutable()
MutableList<T>
toList()
<NK,NV>
MutableMap<NK,NV>toMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
<NK,NV,R extends Map<NK,NV>>
RtoMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction, R target)
MutableSet<T>
toSet()
MutableSortedBag<T>
toSortedBag()
MutableSortedBag<T>
toSortedBag(Comparator<? super T> comparator)
MutableList<T>
toSortedList()
MutableList<T>
toSortedList(Comparator<? super T> comparator)
<NK,NV>
MutableSortedMap<NK,NV>toSortedMap(Comparator<? super NK> comparator, Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
<NK,NV>
MutableSortedMap<NK,NV>toSortedMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
MutableSortedSet<T>
toSortedSet()
MutableSortedSet<T>
toSortedSet(Comparator<? super T> comparator)
String
toString()
<S> MutableStack<Pair<T,S>>
zip(Iterable<S> that)
<S,R extends Collection<Pair<T,S>>>
Rzip(Iterable<S> that, R target)
MutableStack<Pair<T,Integer>>
zipWithIndex()
<R extends Collection<Pair<T,Integer>>>
RzipWithIndex(R target)
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods inherited from interface java.lang.Iterable
spliterator
-
Methods inherited from interface org.eclipse.collections.api.stack.MutableStack
aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.ordered.OrderedIterable
collectWithIndex, getFirstOptional, getLastOptional, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countByEach, countByWith, flatCollectWith, forEach, getAny, groupByAndCollect, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, reduce, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toSortedBagBy, toSortedListBy, toSortedMapBy, toSortedSetBy
-
Methods inherited from interface org.eclipse.collections.api.stack.StackIterable
toStack
-
-
-
-
Method Detail
-
of
public static <T,S extends MutableStack<T>> UnmodifiableStack<T> of(S stack)
-
pop
public T pop()
- Specified by:
pop
in interfaceMutableStack<T>
-
pop
public ListIterable<T> pop(int count)
- Specified by:
pop
in interfaceMutableStack<T>
-
pop
public <R extends Collection<T>> R pop(int count, R targetCollection)
- Specified by:
pop
in interfaceMutableStack<T>
-
pop
public <R extends MutableStack<T>> R pop(int count, R targetStack)
- Specified by:
pop
in interfaceMutableStack<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableStack<T>
-
push
public void push(T item)
- Specified by:
push
in interfaceMutableStack<T>
-
select
public MutableStack<T> select(Predicate<? super T> predicate)
- Specified by:
select
in interfaceMutableStack<T>
- Specified by:
select
in interfaceOrderedIterable<T>
- Specified by:
select
in interfaceRichIterable<T>
- Specified by:
select
in interfaceStackIterable<T>
-
selectWith
public <P> MutableStack<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectWith
in interfaceMutableStack<T>
- Specified by:
selectWith
in interfaceOrderedIterable<T>
- Specified by:
selectWith
in interfaceRichIterable<T>
- Specified by:
selectWith
in interfaceStackIterable<T>
-
reject
public MutableStack<T> reject(Predicate<? super T> predicate)
- Specified by:
reject
in interfaceMutableStack<T>
- Specified by:
reject
in interfaceOrderedIterable<T>
- Specified by:
reject
in interfaceRichIterable<T>
- Specified by:
reject
in interfaceStackIterable<T>
-
rejectWith
public <P> MutableStack<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
rejectWith
in interfaceMutableStack<T>
- Specified by:
rejectWith
in interfaceOrderedIterable<T>
- Specified by:
rejectWith
in interfaceRichIterable<T>
- Specified by:
rejectWith
in interfaceStackIterable<T>
-
partition
public PartitionMutableStack<T> partition(Predicate<? super T> predicate)
- Specified by:
partition
in interfaceMutableStack<T>
- Specified by:
partition
in interfaceOrderedIterable<T>
- Specified by:
partition
in interfaceRichIterable<T>
- Specified by:
partition
in interfaceStackIterable<T>
-
partitionWith
public <P> PartitionMutableStack<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
partitionWith
in interfaceMutableStack<T>
- Specified by:
partitionWith
in interfaceOrderedIterable<T>
- Specified by:
partitionWith
in interfaceRichIterable<T>
- Specified by:
partitionWith
in interfaceStackIterable<T>
-
selectInstancesOf
public <S> MutableStack<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOf
in interfaceMutableStack<T>
- Specified by:
selectInstancesOf
in interfaceOrderedIterable<T>
- Specified by:
selectInstancesOf
in interfaceRichIterable<T>
- Specified by:
selectInstancesOf
in interfaceStackIterable<T>
-
collect
public <V> MutableStack<V> collect(Function<? super T,? extends V> function)
- Specified by:
collect
in interfaceMutableStack<T>
- Specified by:
collect
in interfaceOrderedIterable<T>
- Specified by:
collect
in interfaceRichIterable<T>
- Specified by:
collect
in interfaceStackIterable<T>
-
collectBoolean
public MutableBooleanStack collectBoolean(BooleanFunction<? super T> booleanFunction)
- Specified by:
collectBoolean
in interfaceMutableStack<T>
- Specified by:
collectBoolean
in interfaceOrderedIterable<T>
- Specified by:
collectBoolean
in interfaceRichIterable<T>
- Specified by:
collectBoolean
in interfaceStackIterable<T>
-
collectBoolean
public <R extends MutableBooleanCollection> R collectBoolean(BooleanFunction<? super T> booleanFunction, R target)
- Specified by:
collectBoolean
in interfaceRichIterable<T>
-
flatCollectBoolean
public <R extends MutableBooleanCollection> R flatCollectBoolean(Function<? super T,? extends BooleanIterable> function, R target)
- Specified by:
flatCollectBoolean
in interfaceRichIterable<T>
-
collectByte
public MutableByteStack collectByte(ByteFunction<? super T> byteFunction)
- Specified by:
collectByte
in interfaceMutableStack<T>
- Specified by:
collectByte
in interfaceOrderedIterable<T>
- Specified by:
collectByte
in interfaceRichIterable<T>
- Specified by:
collectByte
in interfaceStackIterable<T>
-
collectByte
public <R extends MutableByteCollection> R collectByte(ByteFunction<? super T> byteFunction, R target)
- Specified by:
collectByte
in interfaceRichIterable<T>
-
flatCollectByte
public <R extends MutableByteCollection> R flatCollectByte(Function<? super T,? extends ByteIterable> function, R target)
- Specified by:
flatCollectByte
in interfaceRichIterable<T>
-
collectChar
public MutableCharStack collectChar(CharFunction<? super T> charFunction)
- Specified by:
collectChar
in interfaceMutableStack<T>
- Specified by:
collectChar
in interfaceOrderedIterable<T>
- Specified by:
collectChar
in interfaceRichIterable<T>
- Specified by:
collectChar
in interfaceStackIterable<T>
-
collectChar
public <R extends MutableCharCollection> R collectChar(CharFunction<? super T> charFunction, R target)
- Specified by:
collectChar
in interfaceRichIterable<T>
-
flatCollectChar
public <R extends MutableCharCollection> R flatCollectChar(Function<? super T,? extends CharIterable> function, R target)
- Specified by:
flatCollectChar
in interfaceRichIterable<T>
-
collectDouble
public MutableDoubleStack collectDouble(DoubleFunction<? super T> doubleFunction)
- Specified by:
collectDouble
in interfaceMutableStack<T>
- Specified by:
collectDouble
in interfaceOrderedIterable<T>
- Specified by:
collectDouble
in interfaceRichIterable<T>
- Specified by:
collectDouble
in interfaceStackIterable<T>
-
collectDouble
public <R extends MutableDoubleCollection> R collectDouble(DoubleFunction<? super T> doubleFunction, R target)
- Specified by:
collectDouble
in interfaceRichIterable<T>
-
flatCollectDouble
public <R extends MutableDoubleCollection> R flatCollectDouble(Function<? super T,? extends DoubleIterable> function, R target)
- Specified by:
flatCollectDouble
in interfaceRichIterable<T>
-
collectFloat
public MutableFloatStack collectFloat(FloatFunction<? super T> floatFunction)
- Specified by:
collectFloat
in interfaceMutableStack<T>
- Specified by:
collectFloat
in interfaceOrderedIterable<T>
- Specified by:
collectFloat
in interfaceRichIterable<T>
- Specified by:
collectFloat
in interfaceStackIterable<T>
-
collectFloat
public <R extends MutableFloatCollection> R collectFloat(FloatFunction<? super T> floatFunction, R target)
- Specified by:
collectFloat
in interfaceRichIterable<T>
-
flatCollectFloat
public <R extends MutableFloatCollection> R flatCollectFloat(Function<? super T,? extends FloatIterable> function, R target)
- Specified by:
flatCollectFloat
in interfaceRichIterable<T>
-
collectInt
public MutableIntStack collectInt(IntFunction<? super T> intFunction)
- Specified by:
collectInt
in interfaceMutableStack<T>
- Specified by:
collectInt
in interfaceOrderedIterable<T>
- Specified by:
collectInt
in interfaceRichIterable<T>
- Specified by:
collectInt
in interfaceStackIterable<T>
-
collectInt
public <R extends MutableIntCollection> R collectInt(IntFunction<? super T> intFunction, R target)
- Specified by:
collectInt
in interfaceRichIterable<T>
-
flatCollectInt
public <R extends MutableIntCollection> R flatCollectInt(Function<? super T,? extends IntIterable> function, R target)
- Specified by:
flatCollectInt
in interfaceRichIterable<T>
-
collectLong
public MutableLongStack collectLong(LongFunction<? super T> longFunction)
- Specified by:
collectLong
in interfaceMutableStack<T>
- Specified by:
collectLong
in interfaceOrderedIterable<T>
- Specified by:
collectLong
in interfaceRichIterable<T>
- Specified by:
collectLong
in interfaceStackIterable<T>
-
collectLong
public <R extends MutableLongCollection> R collectLong(LongFunction<? super T> longFunction, R target)
- Specified by:
collectLong
in interfaceRichIterable<T>
-
flatCollectLong
public <R extends MutableLongCollection> R flatCollectLong(Function<? super T,? extends LongIterable> function, R target)
- Specified by:
flatCollectLong
in interfaceRichIterable<T>
-
collectShort
public MutableShortStack collectShort(ShortFunction<? super T> shortFunction)
- Specified by:
collectShort
in interfaceMutableStack<T>
- Specified by:
collectShort
in interfaceOrderedIterable<T>
- Specified by:
collectShort
in interfaceRichIterable<T>
- Specified by:
collectShort
in interfaceStackIterable<T>
-
collectShort
public <R extends MutableShortCollection> R collectShort(ShortFunction<? super T> shortFunction, R target)
- Specified by:
collectShort
in interfaceRichIterable<T>
-
flatCollectShort
public <R extends MutableShortCollection> R flatCollectShort(Function<? super T,? extends ShortIterable> function, R target)
- Specified by:
flatCollectShort
in interfaceRichIterable<T>
-
collectWith
public <P,V> MutableStack<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
collectWith
in interfaceMutableStack<T>
- Specified by:
collectWith
in interfaceOrderedIterable<T>
- Specified by:
collectWith
in interfaceRichIterable<T>
- Specified by:
collectWith
in interfaceStackIterable<T>
-
collectIf
public <V> MutableStack<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
- Specified by:
collectIf
in interfaceMutableStack<T>
- Specified by:
collectIf
in interfaceOrderedIterable<T>
- Specified by:
collectIf
in interfaceRichIterable<T>
- Specified by:
collectIf
in interfaceStackIterable<T>
-
flatCollect
public <V> MutableStack<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
- Specified by:
flatCollect
in interfaceMutableStack<T>
- Specified by:
flatCollect
in interfaceOrderedIterable<T>
- Specified by:
flatCollect
in interfaceRichIterable<T>
- Specified by:
flatCollect
in interfaceStackIterable<T>
-
zip
public <S> MutableStack<Pair<T,S>> zip(Iterable<S> that)
- Specified by:
zip
in interfaceMutableStack<T>
- Specified by:
zip
in interfaceOrderedIterable<T>
- Specified by:
zip
in interfaceRichIterable<T>
- Specified by:
zip
in interfaceStackIterable<T>
-
zipWithIndex
public MutableStack<Pair<T,Integer>> zipWithIndex()
- Specified by:
zipWithIndex
in interfaceMutableStack<T>
- Specified by:
zipWithIndex
in interfaceOrderedIterable<T>
- Specified by:
zipWithIndex
in interfaceRichIterable<T>
- Specified by:
zipWithIndex
in interfaceStackIterable<T>
-
size
public int size()
- Specified by:
size
in interfaceRichIterable<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceRichIterable<T>
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfaceRichIterable<T>
-
getFirst
public T getFirst()
- Specified by:
getFirst
in interfaceOrderedIterable<T>
- Specified by:
getFirst
in interfaceRichIterable<T>
- Specified by:
getFirst
in interfaceStackIterable<T>
-
getLast
public T getLast()
- Specified by:
getLast
in interfaceOrderedIterable<T>
- Specified by:
getLast
in interfaceRichIterable<T>
- Specified by:
getLast
in interfaceStackIterable<T>
-
getOnly
public T getOnly()
- Specified by:
getOnly
in interfaceRichIterable<T>
-
contains
public boolean contains(Object object)
- Specified by:
contains
in interfaceRichIterable<T>
-
containsAllIterable
public boolean containsAllIterable(Iterable<?> source)
- Specified by:
containsAllIterable
in interfaceRichIterable<T>
-
containsAll
public boolean containsAll(Collection<?> source)
- Specified by:
containsAll
in interfaceRichIterable<T>
-
containsAllArguments
public boolean containsAllArguments(Object... elements)
- Specified by:
containsAllArguments
in interfaceRichIterable<T>
-
select
public <R extends Collection<T>> R select(Predicate<? super T> predicate, R target)
- Specified by:
select
in interfaceRichIterable<T>
-
selectWith
public <P,R extends Collection<T>> R selectWith(Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
- Specified by:
selectWith
in interfaceRichIterable<T>
-
reject
public <R extends Collection<T>> R reject(Predicate<? super T> predicate, R target)
- Specified by:
reject
in interfaceRichIterable<T>
-
rejectWith
public <P,R extends Collection<T>> R rejectWith(Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
- Specified by:
rejectWith
in interfaceRichIterable<T>
-
collect
public <V,R extends Collection<V>> R collect(Function<? super T,? extends V> function, R target)
- Specified by:
collect
in interfaceRichIterable<T>
-
collectWith
public <P,V,R extends Collection<V>> R collectWith(Function2<? super T,? super P,? extends V> function, P parameter, R targetCollection)
- Specified by:
collectWith
in interfaceRichIterable<T>
-
collectIf
public <V,R extends Collection<V>> R collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function, R target)
- Specified by:
collectIf
in interfaceRichIterable<T>
-
flatCollect
public <V,R extends Collection<V>> R flatCollect(Function<? super T,? extends Iterable<V>> function, R target)
- Specified by:
flatCollect
in interfaceRichIterable<T>
-
detect
public T detect(Predicate<? super T> predicate)
- Specified by:
detect
in interfaceRichIterable<T>
-
detectWith
public <P> T detectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
detectWith
in interfaceRichIterable<T>
-
detectOptional
public Optional<T> detectOptional(Predicate<? super T> predicate)
- Specified by:
detectOptional
in interfaceRichIterable<T>
-
detectWithOptional
public <P> Optional<T> detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
detectWithOptional
in interfaceRichIterable<T>
-
detectIfNone
public T detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)
- Specified by:
detectIfNone
in interfaceRichIterable<T>
-
detectWithIfNone
public <P> T detectWithIfNone(Predicate2<? super T,? super P> predicate, P parameter, Function0<? extends T> function)
- Specified by:
detectWithIfNone
in interfaceRichIterable<T>
-
count
public int count(Predicate<? super T> predicate)
- Specified by:
count
in interfaceRichIterable<T>
-
countWith
public <P> int countWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
countWith
in interfaceRichIterable<T>
-
anySatisfy
public boolean anySatisfy(Predicate<? super T> predicate)
- Specified by:
anySatisfy
in interfaceRichIterable<T>
-
anySatisfyWith
public <P> boolean anySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
anySatisfyWith
in interfaceRichIterable<T>
-
allSatisfy
public boolean allSatisfy(Predicate<? super T> predicate)
- Specified by:
allSatisfy
in interfaceRichIterable<T>
-
allSatisfyWith
public <P> boolean allSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
allSatisfyWith
in interfaceRichIterable<T>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super T> predicate)
- Specified by:
noneSatisfy
in interfaceRichIterable<T>
-
noneSatisfyWith
public <P> boolean noneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
noneSatisfyWith
in interfaceRichIterable<T>
-
injectInto
public <IV> IV injectInto(IV injectedValue, Function2<? super IV,? super T,? extends IV> function)
- Specified by:
injectInto
in interfaceRichIterable<T>
-
injectInto
public int injectInto(int injectedValue, IntObjectToIntFunction<? super T> intObjectToIntFunction)
- Specified by:
injectInto
in interfaceRichIterable<T>
-
injectInto
public long injectInto(long injectedValue, LongObjectToLongFunction<? super T> longObjectToLongFunction)
- Specified by:
injectInto
in interfaceRichIterable<T>
-
injectInto
public float injectInto(float injectedValue, FloatObjectToFloatFunction<? super T> floatObjectToFloatFunction)
- Specified by:
injectInto
in interfaceRichIterable<T>
-
injectInto
public double injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super T> doubleObjectToDoubleFunction)
- Specified by:
injectInto
in interfaceRichIterable<T>
-
into
public <R extends Collection<T>> R into(R target)
- Specified by:
into
in interfaceRichIterable<T>
-
toList
public MutableList<T> toList()
- Specified by:
toList
in interfaceRichIterable<T>
-
toSortedList
public MutableList<T> toSortedList()
- Specified by:
toSortedList
in interfaceRichIterable<T>
-
toSortedList
public MutableList<T> toSortedList(Comparator<? super T> comparator)
- Specified by:
toSortedList
in interfaceRichIterable<T>
-
toSet
public MutableSet<T> toSet()
- Specified by:
toSet
in interfaceRichIterable<T>
-
toSortedSet
public MutableSortedSet<T> toSortedSet()
- Specified by:
toSortedSet
in interfaceRichIterable<T>
-
toSortedSet
public MutableSortedSet<T> toSortedSet(Comparator<? super T> comparator)
- Specified by:
toSortedSet
in interfaceRichIterable<T>
-
toImmutable
public ImmutableStack<T> toImmutable()
- Specified by:
toImmutable
in interfaceStackIterable<T>
-
toBag
public MutableBag<T> toBag()
- Specified by:
toBag
in interfaceRichIterable<T>
-
toSortedBag
public MutableSortedBag<T> toSortedBag()
- Specified by:
toSortedBag
in interfaceRichIterable<T>
-
toSortedBag
public MutableSortedBag<T> toSortedBag(Comparator<? super T> comparator)
- Specified by:
toSortedBag
in interfaceRichIterable<T>
-
toMap
public <NK,NV> MutableMap<NK,NV> toMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
- Specified by:
toMap
in interfaceRichIterable<T>
-
toMap
public <NK,NV,R extends Map<NK,NV>> R toMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction, R target)
- Specified by:
toMap
in interfaceRichIterable<T>
-
toSortedMap
public <NK,NV> MutableSortedMap<NK,NV> toSortedMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
- Specified by:
toSortedMap
in interfaceRichIterable<T>
-
toSortedMap
public <NK,NV> MutableSortedMap<NK,NV> toSortedMap(Comparator<? super NK> comparator, Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
- Specified by:
toSortedMap
in interfaceRichIterable<T>
-
toBiMap
public <NK,NV> MutableBiMap<NK,NV> toBiMap(Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
- Specified by:
toBiMap
in interfaceRichIterable<T>
-
asLazy
public LazyIterable<T> asLazy()
- Specified by:
asLazy
in interfaceRichIterable<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceRichIterable<T>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceRichIterable<T>
-
min
public T min(Comparator<? super T> comparator)
- Specified by:
min
in interfaceRichIterable<T>
-
max
public T max(Comparator<? super T> comparator)
- Specified by:
max
in interfaceRichIterable<T>
-
min
public T min()
- Specified by:
min
in interfaceOrderedIterable<T>
- Specified by:
min
in interfaceRichIterable<T>
-
max
public T max()
- Specified by:
max
in interfaceOrderedIterable<T>
- Specified by:
max
in interfaceRichIterable<T>
-
detectIndex
public int detectIndex(Predicate<? super T> predicate)
- Specified by:
detectIndex
in interfaceOrderedIterable<T>
-
minBy
public <V extends Comparable<? super V>> T minBy(Function<? super T,? extends V> function)
- Specified by:
minBy
in interfaceRichIterable<T>
-
maxBy
public <V extends Comparable<? super V>> T maxBy(Function<? super T,? extends V> function)
- Specified by:
maxBy
in interfaceRichIterable<T>
-
sumOfInt
public long sumOfInt(IntFunction<? super T> intFunction)
- Specified by:
sumOfInt
in interfaceRichIterable<T>
-
sumOfFloat
public double sumOfFloat(FloatFunction<? super T> floatFunction)
- Specified by:
sumOfFloat
in interfaceRichIterable<T>
-
sumOfLong
public long sumOfLong(LongFunction<? super T> longFunction)
- Specified by:
sumOfLong
in interfaceRichIterable<T>
-
sumOfDouble
public double sumOfDouble(DoubleFunction<? super T> doubleFunction)
- Specified by:
sumOfDouble
in interfaceRichIterable<T>
-
sumByInt
public <V> MutableObjectLongMap<V> sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
- Specified by:
sumByInt
in interfaceMutableStack<T>
- Specified by:
sumByInt
in interfaceRichIterable<T>
-
sumByFloat
public <V> MutableObjectDoubleMap<V> sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
- Specified by:
sumByFloat
in interfaceMutableStack<T>
- Specified by:
sumByFloat
in interfaceRichIterable<T>
-
sumByLong
public <V> MutableObjectLongMap<V> sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
- Specified by:
sumByLong
in interfaceMutableStack<T>
- Specified by:
sumByLong
in interfaceRichIterable<T>
-
sumByDouble
public <V> MutableObjectDoubleMap<V> sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
- Specified by:
sumByDouble
in interfaceMutableStack<T>
- Specified by:
sumByDouble
in interfaceRichIterable<T>
-
makeString
public String makeString()
- Specified by:
makeString
in interfaceRichIterable<T>
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfaceRichIterable<T>
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfaceRichIterable<T>
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfaceRichIterable<T>
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfaceRichIterable<T>
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfaceRichIterable<T>
-
groupBy
public <V> MutableListMultimap<V,T> groupBy(Function<? super T,? extends V> function)
- Specified by:
groupBy
in interfaceMutableStack<T>
- Specified by:
groupBy
in interfaceOrderedIterable<T>
- Specified by:
groupBy
in interfaceRichIterable<T>
- Specified by:
groupBy
in interfaceStackIterable<T>
-
groupBy
public <V,R extends MutableMultimap<V,T>> R groupBy(Function<? super T,? extends V> function, R target)
- Specified by:
groupBy
in interfaceRichIterable<T>
-
groupByEach
public <V> MutableListMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
groupByEach
in interfaceMutableStack<T>
- Specified by:
groupByEach
in interfaceOrderedIterable<T>
- Specified by:
groupByEach
in interfaceRichIterable<T>
- Specified by:
groupByEach
in interfaceStackIterable<T>
-
groupByEach
public <V,R extends MutableMultimap<V,T>> R groupByEach(Function<? super T,? extends Iterable<V>> function, R target)
- Specified by:
groupByEach
in interfaceRichIterable<T>
-
groupByUniqueKey
public <V> MutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKey
in interfaceMutableStack<T>
- Specified by:
groupByUniqueKey
in interfaceRichIterable<T>
-
groupByUniqueKey
public <V,R extends MutableMapIterable<V,T>> R groupByUniqueKey(Function<? super T,? extends V> function, R target)
- Specified by:
groupByUniqueKey
in interfaceRichIterable<T>
-
zip
public <S,R extends Collection<Pair<T,S>>> R zip(Iterable<S> that, R target)
- Specified by:
zip
in interfaceOrderedIterable<T>
- Specified by:
zip
in interfaceRichIterable<T>
-
zipWithIndex
public <R extends Collection<Pair<T,Integer>>> R zipWithIndex(R target)
- Specified by:
zipWithIndex
in interfaceOrderedIterable<T>
- Specified by:
zipWithIndex
in interfaceRichIterable<T>
-
chunk
public RichIterable<RichIterable<T>> chunk(int size)
- Specified by:
chunk
in interfaceRichIterable<T>
-
tap
public MutableStack<T> tap(Procedure<? super T> procedure)
- Specified by:
tap
in interfaceMutableStack<T>
- Specified by:
tap
in interfaceOrderedIterable<T>
- Specified by:
tap
in interfaceRichIterable<T>
- Specified by:
tap
in interfaceStackIterable<T>
-
each
public void each(Procedure<? super T> procedure)
- Specified by:
each
in interfaceRichIterable<T>
-
peek
public T peek()
- Specified by:
peek
in interfaceStackIterable<T>
-
peek
public ListIterable<T> peek(int count)
- Specified by:
peek
in interfaceStackIterable<T>
-
peekAt
public T peekAt(int index)
- Specified by:
peekAt
in interfaceStackIterable<T>
-
toString
public String toString()
- Specified by:
toString
in interfaceRichIterable<T>
- Specified by:
toString
in interfaceStackIterable<T>
- Overrides:
toString
in classObject
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndex
in interfaceInternalIterable<T>
- Specified by:
forEachWithIndex
in interfaceOrderedIterable<T>
-
forEachWithIndex
public void forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndex
in interfaceOrderedIterable<T>
-
collectWithIndex
public <V> MutableStack<V> collectWithIndex(ObjectIntToObjectFunction<? super T,? extends V> function)
- Specified by:
collectWithIndex
in interfaceMutableStack<T>
- Specified by:
collectWithIndex
in interfaceOrderedIterable<T>
- Specified by:
collectWithIndex
in interfaceStackIterable<T>
-
forEachWith
public <P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
- Specified by:
forEachWith
in interfaceInternalIterable<T>
-
asUnmodifiable
public MutableStack<T> asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableStack<T>
-
asSynchronized
public MutableStack<T> asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableStack<T>
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceStackIterable<T>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceStackIterable<T>
- Overrides:
hashCode
in classObject
-
indexOf
public int indexOf(Object object)
- Specified by:
indexOf
in interfaceOrderedIterable<T>
-
corresponds
public <S> boolean corresponds(OrderedIterable<S> other, Predicate2<? super T,? super S> predicate)
- Specified by:
corresponds
in interfaceOrderedIterable<T>
-
forEach
public void forEach(int startIndex, int endIndex, Procedure<? super T> procedure)
- Specified by:
forEach
in interfaceOrderedIterable<T>
-
takeWhile
public MutableStack<T> takeWhile(Predicate<? super T> predicate)
- Specified by:
takeWhile
in interfaceMutableStack<T>
- Specified by:
takeWhile
in interfaceOrderedIterable<T>
- Specified by:
takeWhile
in interfaceStackIterable<T>
-
dropWhile
public MutableStack<T> dropWhile(Predicate<? super T> predicate)
- Specified by:
dropWhile
in interfaceMutableStack<T>
- Specified by:
dropWhile
in interfaceOrderedIterable<T>
- Specified by:
dropWhile
in interfaceStackIterable<T>
-
partitionWhile
public PartitionMutableStack<T> partitionWhile(Predicate<? super T> predicate)
- Specified by:
partitionWhile
in interfaceMutableStack<T>
- Specified by:
partitionWhile
in interfaceOrderedIterable<T>
- Specified by:
partitionWhile
in interfaceStackIterable<T>
-
distinct
public MutableStack<T> distinct()
- Specified by:
distinct
in interfaceMutableStack<T>
- Specified by:
distinct
in interfaceOrderedIterable<T>
- Specified by:
distinct
in interfaceStackIterable<T>
-
-