Class UnmodifiableShortStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.mutable.primitive.UnmodifiableShortStack
-
- All Implemented Interfaces:
Serializable,OrderedShortIterable,PrimitiveIterable,ShortIterable,MutableShortStack,ShortStack
public class UnmodifiableShortStack extends Object implements MutableShortStack, Serializable
This file was automatically generated from template file unmodifiablePrimitiveStack.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableShortStack(MutableShortStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(ShortPredicate predicate)booleananySatisfy(ShortPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyShortIterableasLazy()MutableShortStackasSynchronized()MutableShortStackasUnmodifiable()doubleaverage()RichIterable<ShortIterable>chunk(int size)voidclear()<V> MutableStack<V>collect(ShortToObjectFunction<? extends V> function)<V> MutableStack<V>collectWithIndex(ShortIntToObjectFunction<? 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(ShortIntToObjectFunction<? 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.booleancontains(short value)booleancontainsAll(short... source)booleancontainsAll(ShortIterable source)intcount(ShortPredicate predicate)shortdetectIfNone(ShortPredicate predicate, short ifNone)voideach(ShortProcedure procedure)booleanequals(Object otherStack)voidforEachWithIndex(ShortIntProcedure procedure)shortgetFirst()inthashCode()intindexOf(short value)<T> TinjectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)<T> TinjectIntoWithIndex(T injectedValue, ObjectShortIntToObjectFunction<? super T,? extends T> function)booleanisEmpty()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)shortmax()shortmaxIfEmpty(short defaultValue)doublemedian()shortmin()shortminIfEmpty(short defaultValue)MutableShortStacknewEmpty()booleannoneSatisfy(ShortPredicate predicate)booleannotEmpty()shortpeek()ShortListpeek(int count)shortpeekAt(int index)shortpop()ShortListpop(int count)voidpush(short item)MutableShortStackreject(ShortPredicate predicate)MutableShortStackselect(ShortPredicate predicate)ShortIteratorshortIterator()intsize()longsum()short[]toArray()short[]toArray(short[] target)MutableShortBagtoBag()ImmutableShortStacktoImmutable()MutableShortListtoList()MutableShortSettoSet()short[]toSortedArray()MutableShortListtoSortedList()StringtoString()-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableShortStack
rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedShortIterable
rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
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
-
-
-
-
Constructor Detail
-
UnmodifiableShortStack
public UnmodifiableShortStack(MutableShortStack stack)
-
-
Method Detail
-
push
public void push(short item)
- Specified by:
pushin interfaceMutableShortStack
-
pop
public short pop()
- Specified by:
popin interfaceMutableShortStack
-
pop
public ShortList pop(int count)
- Specified by:
popin interfaceMutableShortStack
-
peek
public short peek()
- Specified by:
peekin interfaceShortStack
-
peek
public ShortList peek(int count)
- Specified by:
peekin interfaceShortStack
-
peekAt
public short peekAt(int index)
- Specified by:
peekAtin interfaceShortStack
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableShortStack
-
contains
public boolean contains(short value)
- Specified by:
containsin interfaceShortIterable
-
containsAll
public boolean containsAll(short... source)
- Specified by:
containsAllin interfaceShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
- Specified by:
containsAllin interfaceShortIterable
-
shortIterator
public ShortIterator shortIterator()
- Specified by:
shortIteratorin interfaceShortIterable
-
each
public void each(ShortProcedure procedure)
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
count
public int count(ShortPredicate predicate)
- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
public boolean noneSatisfy(ShortPredicate predicate)
- Specified by:
noneSatisfyin interfaceShortIterable
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNonein interfaceShortIterable
-
select
public MutableShortStack select(ShortPredicate predicate)
- Specified by:
selectin interfaceMutableShortStack- Specified by:
selectin interfaceOrderedShortIterable- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortStack
-
reject
public MutableShortStack reject(ShortPredicate predicate)
- Specified by:
rejectin interfaceMutableShortStack- Specified by:
rejectin interfaceOrderedShortIterable- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortStack
-
collect
public <V> MutableStack<V> collect(ShortToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceMutableShortStack- Specified by:
collectin interfaceOrderedShortIterable- Specified by:
collectin interfaceShortIterable- Specified by:
collectin interfaceShortStack
-
sum
public long sum()
- Specified by:
sumin interfaceShortIterable
-
max
public short max()
- Specified by:
maxin interfaceShortIterable
-
min
public short min()
- Specified by:
minin interfaceShortIterable
-
minIfEmpty
public short minIfEmpty(short defaultValue)
- Specified by:
minIfEmptyin interfaceShortIterable
-
maxIfEmpty
public short maxIfEmpty(short defaultValue)
- Specified by:
maxIfEmptyin interfaceShortIterable
-
average
public double average()
- Specified by:
averagein interfaceShortIterable
-
median
public double median()
- Specified by:
medianin interfaceShortIterable
-
toSortedList
public MutableShortList toSortedList()
- Specified by:
toSortedListin interfaceShortIterable
-
toSortedArray
public short[] toSortedArray()
- Specified by:
toSortedArrayin interfaceShortIterable
-
toArray
public short[] toArray()
- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] target)
- Specified by:
toArrayin interfaceShortIterable
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
public MutableShortList toList()
- Specified by:
toListin interfaceShortIterable
-
toSet
public MutableShortSet toSet()
- Specified by:
toSetin interfaceShortIterable
-
toBag
public MutableShortBag toBag()
- Specified by:
toBagin interfaceShortIterable
-
equals
public boolean equals(Object otherStack)
- Specified by:
equalsin interfaceShortStack- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortStack- Overrides:
hashCodein classObject
-
asLazy
public LazyShortIterable asLazy()
- Specified by:
asLazyin interfaceShortIterable
-
asUnmodifiable
public MutableShortStack asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortStack
-
asSynchronized
public MutableShortStack asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortStack
-
toImmutable
public ImmutableShortStack toImmutable()
- Specified by:
toImmutablein interfaceShortStack
-
newEmpty
public MutableShortStack newEmpty()
- Specified by:
newEmptyin interfaceMutableShortStack- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
- Specified by:
chunkin interfaceShortIterable
-
getFirst
public short getFirst()
- Specified by:
getFirstin interfaceOrderedShortIterable
-
indexOf
public int indexOf(short value)
- Specified by:
indexOfin interfaceOrderedShortIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectShortIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndexin interfaceOrderedShortIterable
-
forEachWithIndex
public void forEachWithIndex(ShortIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedShortIterable
-
collectWithIndex
public <V> MutableStack<V> collectWithIndex(ShortIntToObjectFunction<? extends V> function)
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceMutableShortStack- Specified by:
collectWithIndexin interfaceOrderedShortIterable- Specified by:
collectWithIndexin interfaceShortStack- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(ShortIntToObjectFunction<? 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:
collectWithIndexin interfaceOrderedShortIterable- Since:
- 9.1.
-
-