Class UnmodifiableIntStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.mutable.primitive.UnmodifiableIntStack
-
- All Implemented Interfaces:
Serializable
,IntIterable
,OrderedIntIterable
,PrimitiveIterable
,IntStack
,MutableIntStack
public class UnmodifiableIntStack extends Object implements MutableIntStack, Serializable
This file was automatically generated from template file unmodifiablePrimitiveStack.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableIntStack(MutableIntStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(IntPredicate predicate)
boolean
anySatisfy(IntPredicate predicate)
void
appendString(Appendable appendable)
void
appendString(Appendable appendable, String separator)
void
appendString(Appendable appendable, String start, String separator, String end)
LazyIntIterable
asLazy()
MutableIntStack
asSynchronized()
MutableIntStack
asUnmodifiable()
double
average()
RichIterable<IntIterable>
chunk(int size)
void
clear()
<V> MutableStack<V>
collect(IntToObjectFunction<? extends V> function)
<V> MutableStack<V>
collectWithIndex(IntIntToObjectFunction<? extends V> function)
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.<V,R extends Collection<V>>
RcollectWithIndex(IntIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.boolean
contains(int value)
boolean
containsAll(int... source)
boolean
containsAll(IntIterable source)
int
count(IntPredicate predicate)
int
detectIfNone(IntPredicate predicate, int ifNone)
void
each(IntProcedure procedure)
boolean
equals(Object otherStack)
void
forEachWithIndex(IntIntProcedure procedure)
int
getFirst()
int
hashCode()
int
indexOf(int value)
<T> T
injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)
<T> T
injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T,? extends T> function)
IntIterator
intIterator()
boolean
isEmpty()
String
makeString()
String
makeString(String separator)
String
makeString(String start, String separator, String end)
int
max()
int
maxIfEmpty(int defaultValue)
double
median()
int
min()
int
minIfEmpty(int defaultValue)
MutableIntStack
newEmpty()
boolean
noneSatisfy(IntPredicate predicate)
boolean
notEmpty()
int
peek()
IntList
peek(int count)
int
peekAt(int index)
int
pop()
IntList
pop(int count)
void
push(int item)
MutableIntStack
reject(IntPredicate predicate)
MutableIntStack
select(IntPredicate predicate)
int
size()
long
sum()
int[]
toArray()
int[]
toArray(int[] target)
MutableIntBag
toBag()
ImmutableIntStack
toImmutable()
MutableIntList
toList()
MutableIntSet
toSet()
int[]
toSortedArray()
MutableIntList
toSortedList()
String
toString()
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableIntStack
rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterable
rejectWithIndex, selectWithIndex
-
-
-
-
Constructor Detail
-
UnmodifiableIntStack
public UnmodifiableIntStack(MutableIntStack stack)
-
-
Method Detail
-
push
public void push(int item)
- Specified by:
push
in interfaceMutableIntStack
-
pop
public int pop()
- Specified by:
pop
in interfaceMutableIntStack
-
pop
public IntList pop(int count)
- Specified by:
pop
in interfaceMutableIntStack
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntStack
-
contains
public boolean contains(int value)
- Specified by:
contains
in interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAll
in interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAll
in interfaceIntIterable
-
intIterator
public IntIterator intIterator()
- Specified by:
intIterator
in interfaceIntIterable
-
each
public void each(IntProcedure procedure)
- Specified by:
each
in interfaceIntIterable
- Since:
- 7.0.
-
count
public int count(IntPredicate predicate)
- Specified by:
count
in interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfy
in interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfy
in interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfy
in interfaceIntIterable
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNone
in interfaceIntIterable
-
select
public MutableIntStack select(IntPredicate predicate)
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntStack
- Specified by:
select
in interfaceMutableIntStack
- Specified by:
select
in interfaceOrderedIntIterable
-
reject
public MutableIntStack reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntStack
- Specified by:
reject
in interfaceMutableIntStack
- Specified by:
reject
in interfaceOrderedIntIterable
-
collect
public <V> MutableStack<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceIntStack
- Specified by:
collect
in interfaceMutableIntStack
- Specified by:
collect
in interfaceOrderedIntIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceIntIterable
-
max
public int max()
- Specified by:
max
in interfaceIntIterable
-
min
public int min()
- Specified by:
min
in interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmpty
in interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmpty
in interfaceIntIterable
-
average
public double average()
- Specified by:
average
in interfaceIntIterable
-
median
public double median()
- Specified by:
median
in interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedList
in interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArray
in interfaceIntIterable
-
toArray
public int[] toArray()
- Specified by:
toArray
in interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArray
in interfaceIntIterable
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classObject
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
toList
public MutableIntList toList()
- Specified by:
toList
in interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSet
in interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBag
in interfaceIntIterable
-
equals
public boolean equals(Object otherStack)
-
hashCode
public int hashCode()
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
-
asUnmodifiable
public MutableIntStack asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntStack
-
asSynchronized
public MutableIntStack asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntStack
-
toImmutable
public ImmutableIntStack toImmutable()
- Specified by:
toImmutable
in interfaceIntStack
-
newEmpty
public MutableIntStack newEmpty()
- Specified by:
newEmpty
in interfaceMutableIntStack
- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunk
in interfaceIntIterable
-
getFirst
public int getFirst()
- Specified by:
getFirst
in interfaceOrderedIntIterable
-
indexOf
public int indexOf(int value)
- Specified by:
indexOf
in interfaceOrderedIntIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedIntIterable
-
forEachWithIndex
public void forEachWithIndex(IntIntProcedure procedure)
- Specified by:
forEachWithIndex
in interfaceOrderedIntIterable
-
collectWithIndex
public <V> MutableStack<V> collectWithIndex(IntIntToObjectFunction<? extends V> function)
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceIntStack
- Specified by:
collectWithIndex
in interfaceMutableIntStack
- Specified by:
collectWithIndex
in interfaceOrderedIntIterable
- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(IntIntToObjectFunction<? extends V> function, R target)
Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceOrderedIntIterable
- Since:
- 9.1.
-
-