public class SynchronizedLongStack extends Object implements MutableLongStack, Serializable
MutableLongStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
LongIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
MutableLongStack.asSynchronized(),
MutableStack.asSynchronized(),
Serialized Form| Constructor and Description |
|---|
SynchronizedLongStack(MutableLongStack stack) |
SynchronizedLongStack(MutableLongStack stack,
Object newLock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(LongPredicate predicate) |
boolean |
anySatisfy(LongPredicate predicate) |
void |
appendString(Appendable appendable) |
void |
appendString(Appendable appendable,
String separator) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
LazyLongIterable |
asLazy() |
MutableLongStack |
asSynchronized() |
MutableLongStack |
asUnmodifiable() |
double |
average() |
RichIterable<LongIterable> |
chunk(int size) |
void |
clear() |
<V> MutableStack<V> |
collect(LongToObjectFunction<? extends V> function) |
<V> MutableStack<V> |
collectWithIndex(LongIntToObjectFunction<? 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(LongIntToObjectFunction<? 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(long value) |
boolean |
containsAll(long... source) |
boolean |
containsAll(LongIterable source) |
int |
count(LongPredicate predicate) |
long |
detectIfNone(LongPredicate predicate,
long ifNone) |
void |
each(LongProcedure procedure) |
boolean |
equals(Object otherStack) |
void |
forEachWithIndex(LongIntProcedure procedure) |
long |
getFirst() |
int |
hashCode() |
int |
indexOf(long value) |
<T> T |
injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectLongIntToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty() |
LongIterator |
longIterator()
Must be called in a synchronized block.
|
String |
makeString() |
String |
makeString(String separator) |
String |
makeString(String start,
String separator,
String end) |
long |
max() |
long |
maxIfEmpty(long defaultValue) |
double |
median() |
long |
min() |
long |
minIfEmpty(long defaultValue) |
MutableLongStack |
newEmpty() |
boolean |
noneSatisfy(LongPredicate predicate) |
boolean |
notEmpty() |
long |
peek() |
LongList |
peek(int count) |
long |
peekAt(int index) |
long |
pop() |
LongList |
pop(int count) |
void |
push(long item) |
MutableLongStack |
reject(LongPredicate predicate) |
MutableLongStack |
rejectWithIndex(LongIntPredicate predicate)
Returns a new MutableLongStack excluding all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableLongCollection> |
rejectWithIndex(LongIntPredicate predicate,
R target)
Returns a new MutableLongCollection excluding all elements with corresponding indexes matching the specified predicate.
|
MutableLongStack |
select(LongPredicate predicate) |
MutableLongStack |
selectWithIndex(LongIntPredicate predicate)
Returns a new MutableLongStack including all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableLongCollection> |
selectWithIndex(LongIntPredicate predicate,
R target)
Returns a new MutableLongCollection including all elements with corresponding indexes matching the specified predicate.
|
int |
size() |
long |
sum() |
long[] |
toArray() |
long[] |
toArray(long[] target) |
MutableLongBag |
toBag() |
ImmutableLongStack |
toImmutable() |
MutableLongList |
toList() |
MutableLongSet |
toSet() |
long[] |
toSortedArray() |
MutableLongList |
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 SynchronizedLongStack(MutableLongStack stack)
public SynchronizedLongStack(MutableLongStack stack, Object newLock)
public void push(long item)
push in interface MutableLongStackpublic long pop()
pop in interface MutableLongStackpublic LongList pop(int count)
pop in interface MutableLongStackpublic int size()
size in interface PrimitiveIterablepublic boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableLongStackpublic boolean contains(long value)
contains in interface LongIterablepublic boolean containsAll(long... source)
containsAll in interface LongIterablepublic boolean containsAll(LongIterable source)
containsAll in interface LongIterablepublic LongIterator longIterator()
longIterator in interface LongIterablepublic void each(LongProcedure procedure)
each in interface LongIterablepublic int count(LongPredicate predicate)
count in interface LongIterablepublic boolean anySatisfy(LongPredicate predicate)
anySatisfy in interface LongIterablepublic boolean allSatisfy(LongPredicate predicate)
allSatisfy in interface LongIterablepublic boolean noneSatisfy(LongPredicate predicate)
noneSatisfy in interface LongIterablepublic long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone in interface LongIterablepublic MutableLongStack select(LongPredicate predicate)
select in interface LongIterableselect in interface OrderedLongIterableselect in interface LongStackselect in interface MutableLongStackpublic MutableLongStack reject(LongPredicate predicate)
reject in interface LongIterablereject in interface OrderedLongIterablereject in interface LongStackreject in interface MutableLongStackpublic <V> MutableStack<V> collect(LongToObjectFunction<? extends V> function)
collect in interface LongIterablecollect in interface OrderedLongIterablecollect in interface LongStackcollect in interface MutableLongStackpublic long sum()
sum in interface LongIterablepublic long max()
max in interface LongIterablepublic long min()
min in interface LongIterablepublic long minIfEmpty(long defaultValue)
minIfEmpty in interface LongIterablepublic long maxIfEmpty(long defaultValue)
maxIfEmpty in interface LongIterablepublic double average()
average in interface LongIterablepublic double median()
median in interface LongIterablepublic MutableLongList toSortedList()
toSortedList in interface LongIterablepublic long[] toSortedArray()
toSortedArray in interface LongIterablepublic long[] toArray()
toArray in interface LongIterablepublic long[] toArray(long[] target)
toArray in interface LongIterablepublic 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 MutableLongList toList()
toList in interface LongIterablepublic MutableLongSet toSet()
toSet in interface LongIterablepublic MutableLongBag toBag()
toBag in interface LongIterablepublic boolean equals(Object otherStack)
public int hashCode()
public LazyLongIterable asLazy()
asLazy in interface LongIterablepublic MutableLongStack asUnmodifiable()
asUnmodifiable in interface MutableLongStackpublic MutableLongStack asSynchronized()
asSynchronized in interface MutableLongStackpublic ImmutableLongStack toImmutable()
toImmutable in interface LongStackpublic MutableLongStack newEmpty()
newEmpty in interface MutableLongStackpublic <T> T injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface LongIterablepublic RichIterable<LongIterable> chunk(int size)
chunk in interface LongIterablepublic long getFirst()
getFirst in interface OrderedLongIterablepublic int indexOf(long value)
indexOf in interface OrderedLongIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectLongIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedLongIterablepublic void forEachWithIndex(LongIntProcedure procedure)
forEachWithIndex in interface OrderedLongIterablepublic MutableLongStack selectWithIndex(LongIntPredicate predicate)
selectWithIndex in interface OrderedLongIterableselectWithIndex in interface LongStackselectWithIndex in interface MutableLongStackpublic <R extends MutableLongCollection> R selectWithIndex(LongIntPredicate predicate, R target)
selectWithIndex in interface OrderedLongIterablepublic MutableLongStack rejectWithIndex(LongIntPredicate predicate)
rejectWithIndex in interface OrderedLongIterablerejectWithIndex in interface LongStackrejectWithIndex in interface MutableLongStackpublic <R extends MutableLongCollection> R rejectWithIndex(LongIntPredicate predicate, R target)
rejectWithIndex in interface OrderedLongIterablepublic <V> MutableStack<V> collectWithIndex(LongIntToObjectFunction<? extends V> function)
collectWithIndex in interface OrderedLongIterablecollectWithIndex in interface LongStackcollectWithIndex in interface MutableLongStackpublic <V,R extends Collection<V>> R collectWithIndex(LongIntToObjectFunction<? extends V> function, R target)
collectWithIndex in interface OrderedLongIterableCopyright © 2004–2022. All rights reserved.