public class SynchronizedIntStack extends Object implements MutableIntStack, Serializable
MutableIntStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
IntIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
MutableIntStack.asSynchronized(),
MutableStack.asSynchronized(),
Serialized Form| Constructor and Description |
|---|
SynchronizedIntStack(MutableIntStack stack) |
SynchronizedIntStack(MutableIntStack stack,
Object newLock) |
| Modifier and Type | Method and 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>> |
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.
|
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()
Must be called in a synchronized block.
|
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 |
rejectWithIndex(IntIntPredicate predicate)
Returns a new MutableIntStack excluding all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableIntCollection> |
rejectWithIndex(IntIntPredicate predicate,
R target)
Returns a new MutableIntCollection excluding all elements with corresponding indexes matching the specified predicate.
|
MutableIntStack |
select(IntPredicate predicate) |
MutableIntStack |
selectWithIndex(IntIntPredicate predicate)
Returns a new MutableIntStack including all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableIntCollection> |
selectWithIndex(IntIntPredicate predicate,
R target)
Returns a new MutableIntCollection including all elements with corresponding indexes matching the specified 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() |
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 SynchronizedIntStack(MutableIntStack stack)
public SynchronizedIntStack(MutableIntStack stack, Object newLock)
public void push(int item)
push in interface MutableIntStackpublic int pop()
pop in interface MutableIntStackpublic IntList pop(int count)
pop in interface MutableIntStackpublic int size()
size in interface PrimitiveIterablepublic boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableIntStackpublic boolean contains(int value)
contains in interface IntIterablepublic boolean containsAll(int... source)
containsAll in interface IntIterablepublic boolean containsAll(IntIterable source)
containsAll in interface IntIterablepublic IntIterator intIterator()
intIterator in interface IntIterablepublic void each(IntProcedure procedure)
each in interface IntIterablepublic int count(IntPredicate predicate)
count in interface IntIterablepublic boolean anySatisfy(IntPredicate predicate)
anySatisfy in interface IntIterablepublic boolean allSatisfy(IntPredicate predicate)
allSatisfy in interface IntIterablepublic boolean noneSatisfy(IntPredicate predicate)
noneSatisfy in interface IntIterablepublic int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone in interface IntIterablepublic MutableIntStack select(IntPredicate predicate)
select in interface IntIterableselect in interface OrderedIntIterableselect in interface IntStackselect in interface MutableIntStackpublic MutableIntStack reject(IntPredicate predicate)
reject in interface IntIterablereject in interface OrderedIntIterablereject in interface IntStackreject in interface MutableIntStackpublic <V> MutableStack<V> collect(IntToObjectFunction<? extends V> function)
collect in interface IntIterablecollect in interface OrderedIntIterablecollect in interface IntStackcollect in interface MutableIntStackpublic long sum()
sum in interface IntIterablepublic int max()
max in interface IntIterablepublic int min()
min in interface IntIterablepublic int minIfEmpty(int defaultValue)
minIfEmpty in interface IntIterablepublic int maxIfEmpty(int defaultValue)
maxIfEmpty in interface IntIterablepublic double average()
average in interface IntIterablepublic double median()
median in interface IntIterablepublic MutableIntList toSortedList()
toSortedList in interface IntIterablepublic int[] toSortedArray()
toSortedArray in interface IntIterablepublic int[] toArray()
toArray in interface IntIterablepublic int[] toArray(int[] target)
toArray in interface IntIterablepublic 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 MutableIntList toList()
toList in interface IntIterablepublic MutableIntSet toSet()
toSet in interface IntIterablepublic MutableIntBag toBag()
toBag in interface IntIterablepublic boolean equals(Object otherStack)
public int hashCode()
public LazyIntIterable asLazy()
asLazy in interface IntIterablepublic MutableIntStack asUnmodifiable()
asUnmodifiable in interface MutableIntStackpublic MutableIntStack asSynchronized()
asSynchronized in interface MutableIntStackpublic ImmutableIntStack toImmutable()
toImmutable in interface IntStackpublic MutableIntStack newEmpty()
newEmpty in interface MutableIntStackpublic <T> T injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface IntIterablepublic RichIterable<IntIterable> chunk(int size)
chunk in interface IntIterablepublic int getFirst()
getFirst in interface OrderedIntIterablepublic int indexOf(int value)
indexOf in interface OrderedIntIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectIntIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedIntIterablepublic void forEachWithIndex(IntIntProcedure procedure)
forEachWithIndex in interface OrderedIntIterablepublic MutableIntStack selectWithIndex(IntIntPredicate predicate)
selectWithIndex in interface OrderedIntIterableselectWithIndex in interface IntStackselectWithIndex in interface MutableIntStackpublic <R extends MutableIntCollection> R selectWithIndex(IntIntPredicate predicate, R target)
selectWithIndex in interface OrderedIntIterablepublic MutableIntStack rejectWithIndex(IntIntPredicate predicate)
rejectWithIndex in interface OrderedIntIterablerejectWithIndex in interface IntStackrejectWithIndex in interface MutableIntStackpublic <R extends MutableIntCollection> R rejectWithIndex(IntIntPredicate predicate, R target)
rejectWithIndex in interface OrderedIntIterablepublic <V> MutableStack<V> collectWithIndex(IntIntToObjectFunction<? extends V> function)
collectWithIndex in interface OrderedIntIterablecollectWithIndex in interface IntStackcollectWithIndex in interface MutableIntStackpublic <V,R extends Collection<V>> R collectWithIndex(IntIntToObjectFunction<? extends V> function, R target)
collectWithIndex in interface OrderedIntIterableCopyright © 2004–2022. All rights reserved.