public class SynchronizedShortStack extends Object implements MutableShortStack, Serializable
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.
MutableShortStack.asSynchronized(),
MutableStack.asSynchronized(),
Serialized Form| Constructor and Description |
|---|
SynchronizedShortStack(MutableShortStack stack) |
SynchronizedShortStack(MutableShortStack stack,
Object newLock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(ShortPredicate predicate) |
boolean |
anySatisfy(ShortPredicate predicate) |
void |
appendString(Appendable appendable) |
void |
appendString(Appendable appendable,
String separator) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
LazyShortIterable |
asLazy() |
MutableShortStack |
asSynchronized() |
MutableShortStack |
asUnmodifiable() |
double |
average() |
RichIterable<ShortIterable> |
chunk(int size) |
void |
clear() |
<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>> |
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.
|
boolean |
contains(short value) |
boolean |
containsAll(short... source) |
boolean |
containsAll(ShortIterable source) |
int |
count(ShortPredicate predicate) |
short |
detectIfNone(ShortPredicate predicate,
short ifNone) |
void |
each(ShortProcedure procedure) |
boolean |
equals(Object otherStack) |
void |
forEachWithIndex(ShortIntProcedure procedure) |
short |
getFirst() |
int |
hashCode() |
int |
indexOf(short value) |
<T> T |
injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectShortIntToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty() |
String |
makeString() |
String |
makeString(String separator) |
String |
makeString(String start,
String separator,
String end) |
short |
max() |
short |
maxIfEmpty(short defaultValue) |
double |
median() |
short |
min() |
short |
minIfEmpty(short defaultValue) |
MutableShortStack |
newEmpty() |
boolean |
noneSatisfy(ShortPredicate predicate) |
boolean |
notEmpty() |
short |
peek() |
ShortList |
peek(int count) |
short |
peekAt(int index) |
short |
pop() |
ShortList |
pop(int count) |
void |
push(short item) |
MutableShortStack |
reject(ShortPredicate predicate) |
MutableShortStack |
rejectWithIndex(ShortIntPredicate predicate)
Returns a new MutableShortStack excluding all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableShortCollection> |
rejectWithIndex(ShortIntPredicate predicate,
R target)
Returns a new MutableShortCollection excluding all elements with corresponding indexes matching the specified predicate.
|
MutableShortStack |
select(ShortPredicate predicate) |
MutableShortStack |
selectWithIndex(ShortIntPredicate predicate)
Returns a new MutableShortStack including all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableShortCollection> |
selectWithIndex(ShortIntPredicate predicate,
R target)
Returns a new MutableShortCollection including all elements with corresponding indexes matching the specified predicate.
|
ShortIterator |
shortIterator()
Must be called in a synchronized block.
|
int |
size() |
long |
sum() |
short[] |
toArray() |
short[] |
toArray(short[] target) |
MutableShortBag |
toBag() |
ImmutableShortStack |
toImmutable() |
MutableShortList |
toList() |
MutableShortSet |
toSet() |
short[] |
toSortedArray() |
MutableShortList |
toSortedList() |
String |
toString() |
tapaverageIfEmpty, 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, toSortedListBypublic SynchronizedShortStack(MutableShortStack stack)
public SynchronizedShortStack(MutableShortStack stack, Object newLock)
public void push(short item)
push in interface MutableShortStackpublic short pop()
pop in interface MutableShortStackpublic ShortList pop(int count)
pop in interface MutableShortStackpublic short peek()
peek in interface ShortStackpublic ShortList peek(int count)
peek in interface ShortStackpublic short peekAt(int index)
peekAt in interface ShortStackpublic int size()
size in interface PrimitiveIterablepublic boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableShortStackpublic boolean contains(short value)
contains in interface ShortIterablepublic boolean containsAll(short... source)
containsAll in interface ShortIterablepublic boolean containsAll(ShortIterable source)
containsAll in interface ShortIterablepublic ShortIterator shortIterator()
shortIterator in interface ShortIterablepublic void each(ShortProcedure procedure)
each in interface ShortIterablepublic int count(ShortPredicate predicate)
count in interface ShortIterablepublic boolean anySatisfy(ShortPredicate predicate)
anySatisfy in interface ShortIterablepublic boolean allSatisfy(ShortPredicate predicate)
allSatisfy in interface ShortIterablepublic boolean noneSatisfy(ShortPredicate predicate)
noneSatisfy in interface ShortIterablepublic short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterablepublic MutableShortStack select(ShortPredicate predicate)
select in interface OrderedShortIterableselect in interface ShortIterableselect in interface MutableShortStackselect in interface ShortStackpublic MutableShortStack reject(ShortPredicate predicate)
reject in interface OrderedShortIterablereject in interface ShortIterablereject in interface MutableShortStackreject in interface ShortStackpublic <V> MutableStack<V> collect(ShortToObjectFunction<? extends V> function)
collect in interface OrderedShortIterablecollect in interface ShortIterablecollect in interface MutableShortStackcollect in interface ShortStackpublic long sum()
sum in interface ShortIterablepublic short max()
max in interface ShortIterablepublic short min()
min in interface ShortIterablepublic short minIfEmpty(short defaultValue)
minIfEmpty in interface ShortIterablepublic short maxIfEmpty(short defaultValue)
maxIfEmpty in interface ShortIterablepublic double average()
average in interface ShortIterablepublic double median()
median in interface ShortIterablepublic MutableShortList toSortedList()
toSortedList in interface ShortIterablepublic short[] toSortedArray()
toSortedArray in interface ShortIterablepublic short[] toArray()
toArray in interface ShortIterablepublic short[] toArray(short[] target)
toArray in interface ShortIterablepublic String toString()
toString in interface PrimitiveIterabletoString in class Objectpublic String makeString()
makeString in interface PrimitiveIterablepublic String makeString(String separator)
makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
makeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic MutableShortList toList()
toList in interface ShortIterablepublic MutableShortSet toSet()
toSet in interface ShortIterablepublic MutableShortBag toBag()
toBag in interface ShortIterablepublic boolean equals(Object otherStack)
equals in interface ShortStackequals in class Objectpublic int hashCode()
hashCode in interface ShortStackhashCode in class Objectpublic LazyShortIterable asLazy()
asLazy in interface ShortIterablepublic MutableShortStack asUnmodifiable()
asUnmodifiable in interface MutableShortStackpublic MutableShortStack asSynchronized()
asSynchronized in interface MutableShortStackpublic ImmutableShortStack toImmutable()
toImmutable in interface ShortStackpublic MutableShortStack newEmpty()
newEmpty in interface MutableShortStackpublic <T> T injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterablepublic RichIterable<ShortIterable> chunk(int size)
chunk in interface ShortIterablepublic short getFirst()
getFirst in interface OrderedShortIterablepublic int indexOf(short value)
indexOf in interface OrderedShortIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectShortIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedShortIterablepublic void forEachWithIndex(ShortIntProcedure procedure)
forEachWithIndex in interface OrderedShortIterablepublic MutableShortStack selectWithIndex(ShortIntPredicate predicate)
selectWithIndex in interface OrderedShortIterableselectWithIndex in interface MutableShortStackselectWithIndex in interface ShortStackpublic <R extends MutableShortCollection> R selectWithIndex(ShortIntPredicate predicate, R target)
selectWithIndex in interface OrderedShortIterablepublic MutableShortStack rejectWithIndex(ShortIntPredicate predicate)
rejectWithIndex in interface OrderedShortIterablerejectWithIndex in interface MutableShortStackrejectWithIndex in interface ShortStackpublic <R extends MutableShortCollection> R rejectWithIndex(ShortIntPredicate predicate, R target)
rejectWithIndex in interface OrderedShortIterablepublic <V> MutableStack<V> collectWithIndex(ShortIntToObjectFunction<? extends V> function)
collectWithIndex in interface OrderedShortIterablecollectWithIndex in interface MutableShortStackcollectWithIndex in interface ShortStackpublic <V,R extends Collection<V>> R collectWithIndex(ShortIntToObjectFunction<? extends V> function, R target)
collectWithIndex in interface OrderedShortIterableCopyright © 2004–2022. All rights reserved.