Class SynchronizedShortStack
java.lang.Object
org.eclipse.collections.impl.stack.mutable.primitive.SynchronizedShortStack
- All Implemented Interfaces:
Serializable,OrderedShortIterable,PrimitiveIterable,ShortIterable,MutableShortStack,ShortStack
A synchronized view of a
MutableShortStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
ShortIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(ShortPredicate predicate) booleananySatisfy(ShortPredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()doubleaverage()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) booleanvoidforEachWithIndex(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()makeString(String separator) makeString(String start, String separator, String end) shortmax()shortmaxIfEmpty(short defaultValue) doublemedian()shortmin()shortminIfEmpty(short defaultValue) newEmpty()booleannoneSatisfy(ShortPredicate predicate) booleannotEmpty()shortpeek()peek(int count) shortpeekAt(int index) shortpop()pop(int count) voidpush(short item) reject(ShortPredicate predicate) rejectWithIndex(ShortIntPredicate predicate) Returns a new MutableShortStack excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableShortCollection>
RrejectWithIndex(ShortIntPredicate predicate, R target) Returns a new MutableShortCollection excluding all elements with corresponding indexes matching the specified predicate.select(ShortPredicate predicate) selectWithIndex(ShortIntPredicate predicate) Returns a new MutableShortStack including all elements with corresponding indexes matching the specified predicate.<R extends MutableShortCollection>
RselectWithIndex(ShortIntPredicate predicate, R target) Returns a new MutableShortCollection including all elements with corresponding indexes matching the specified predicate.Must be called in a synchronized block.intsize()longsum()short[]toArray()short[]toArray(short[] target) toBag()toList()toSet()short[]toStack()toString()Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableShortStack
tapMethods 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 Details
-
SynchronizedShortStack
-
SynchronizedShortStack
-
-
Method Details
-
push
public void push(short item) - Specified by:
pushin interfaceMutableShortStack
-
pop
public short pop()- Specified by:
popin interfaceMutableShortStack
-
pop
- Specified by:
popin interfaceMutableShortStack
-
peek
public short peek()- Specified by:
peekin interfaceShortStack
-
peek
- 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
- Specified by:
containsAllin interfaceShortIterable
-
shortIterator
Must be called in a synchronized block.- Specified by:
shortIteratorin interfaceShortIterable
-
each
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
count
- Specified by:
countin interfaceShortIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceShortIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceShortIterable
-
select
- Specified by:
selectin interfaceMutableShortStack- Specified by:
selectin interfaceOrderedShortIterable- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortStack
-
reject
- Specified by:
rejectin interfaceMutableShortStack- Specified by:
rejectin interfaceOrderedShortIterable- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortStack
-
collect
- 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
- 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
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
- Specified by:
toListin interfaceShortIterable
-
toSet
- Specified by:
toSetin interfaceShortIterable
-
toBag
- Specified by:
toBagin interfaceShortIterable
-
equals
- Specified by:
equalsin interfaceShortStack- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceShortStack- Overrides:
hashCodein classObject
-
asLazy
- Specified by:
asLazyin interfaceShortIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableShortStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableShortStack
-
toImmutable
- Specified by:
toImmutablein interfaceShortStack
-
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
- 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
- Specified by:
forEachWithIndexin interfaceOrderedShortIterable
-
selectWithIndex
Returns a new MutableShortStack including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceMutableShortStack- Specified by:
selectWithIndexin interfaceOrderedShortIterable- Specified by:
selectWithIndexin interfaceShortStack- Since:
- 11.1.
-
selectWithIndex
Returns a new MutableShortCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedShortIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableShortStack excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceMutableShortStack- Specified by:
rejectWithIndexin interfaceOrderedShortIterable- Specified by:
rejectWithIndexin interfaceShortStack- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableShortCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedShortIterable- Since:
- 11.1.
-
collectWithIndex
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.
-
toStack
- Specified by:
toStackin interfaceOrderedShortIterable
-