public class SynchronizedCharStack extends Object implements MutableCharStack, Serializable
MutableCharStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
CharIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
MutableCharStack.asSynchronized(),
MutableStack.asSynchronized(),
Serialized Form| Constructor and Description |
|---|
SynchronizedCharStack(MutableCharStack stack) |
SynchronizedCharStack(MutableCharStack stack,
Object newLock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(CharPredicate predicate) |
boolean |
anySatisfy(CharPredicate predicate) |
void |
appendString(Appendable appendable) |
void |
appendString(Appendable appendable,
String separator) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
LazyCharIterable |
asLazy() |
MutableCharStack |
asSynchronized() |
MutableCharStack |
asUnmodifiable() |
double |
average() |
CharIterator |
charIterator()
Must be called in a synchronized block.
|
RichIterable<CharIterable> |
chunk(int size) |
void |
clear() |
<V> MutableStack<V> |
collect(CharToObjectFunction<? extends V> function) |
<V> MutableStack<V> |
collectWithIndex(CharIntToObjectFunction<? 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(CharIntToObjectFunction<? 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(char value) |
boolean |
containsAll(char... source) |
boolean |
containsAll(CharIterable source) |
int |
count(CharPredicate predicate) |
char |
detectIfNone(CharPredicate predicate,
char ifNone) |
void |
each(CharProcedure procedure) |
boolean |
equals(Object otherStack) |
void |
forEachWithIndex(CharIntProcedure procedure) |
char |
getFirst() |
int |
hashCode() |
int |
indexOf(char value) |
<T> T |
injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectCharIntToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty() |
String |
makeString() |
String |
makeString(String separator) |
String |
makeString(String start,
String separator,
String end) |
char |
max() |
char |
maxIfEmpty(char defaultValue) |
double |
median() |
char |
min() |
char |
minIfEmpty(char defaultValue) |
MutableCharStack |
newEmpty() |
boolean |
noneSatisfy(CharPredicate predicate) |
boolean |
notEmpty() |
char |
peek() |
CharList |
peek(int count) |
char |
peekAt(int index) |
char |
pop() |
CharList |
pop(int count) |
void |
push(char item) |
MutableCharStack |
reject(CharPredicate predicate) |
MutableCharStack |
rejectWithIndex(CharIntPredicate predicate)
Returns a new MutableCharStack excluding all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableCharCollection> |
rejectWithIndex(CharIntPredicate predicate,
R target)
Returns a new MutableCharCollection excluding all elements with corresponding indexes matching the specified predicate.
|
MutableCharStack |
select(CharPredicate predicate) |
MutableCharStack |
selectWithIndex(CharIntPredicate predicate)
Returns a new MutableCharStack including all elements with corresponding indexes matching the specified predicate.
|
<R extends MutableCharCollection> |
selectWithIndex(CharIntPredicate predicate,
R target)
Returns a new MutableCharCollection including all elements with corresponding indexes matching the specified predicate.
|
int |
size() |
long |
sum() |
char[] |
toArray() |
char[] |
toArray(char[] target) |
MutableCharBag |
toBag() |
ImmutableCharStack |
toImmutable() |
MutableCharList |
toList() |
MutableCharSet |
toSet() |
char[] |
toSortedArray() |
MutableCharList |
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 SynchronizedCharStack(MutableCharStack stack)
public SynchronizedCharStack(MutableCharStack stack, Object newLock)
public void push(char item)
push in interface MutableCharStackpublic char pop()
pop in interface MutableCharStackpublic CharList pop(int count)
pop in interface MutableCharStackpublic int size()
size in interface PrimitiveIterablepublic boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic void clear()
clear in interface MutableCharStackpublic boolean contains(char value)
contains in interface CharIterablepublic boolean containsAll(char... source)
containsAll in interface CharIterablepublic boolean containsAll(CharIterable source)
containsAll in interface CharIterablepublic CharIterator charIterator()
charIterator in interface CharIterablepublic void each(CharProcedure procedure)
each in interface CharIterablepublic int count(CharPredicate predicate)
count in interface CharIterablepublic boolean anySatisfy(CharPredicate predicate)
anySatisfy in interface CharIterablepublic boolean allSatisfy(CharPredicate predicate)
allSatisfy in interface CharIterablepublic boolean noneSatisfy(CharPredicate predicate)
noneSatisfy in interface CharIterablepublic char detectIfNone(CharPredicate predicate, char ifNone)
detectIfNone in interface CharIterablepublic MutableCharStack select(CharPredicate predicate)
select in interface CharIterableselect in interface OrderedCharIterableselect in interface CharStackselect in interface MutableCharStackpublic MutableCharStack reject(CharPredicate predicate)
reject in interface CharIterablereject in interface OrderedCharIterablereject in interface CharStackreject in interface MutableCharStackpublic <V> MutableStack<V> collect(CharToObjectFunction<? extends V> function)
collect in interface CharIterablecollect in interface OrderedCharIterablecollect in interface CharStackcollect in interface MutableCharStackpublic long sum()
sum in interface CharIterablepublic char max()
max in interface CharIterablepublic char min()
min in interface CharIterablepublic char minIfEmpty(char defaultValue)
minIfEmpty in interface CharIterablepublic char maxIfEmpty(char defaultValue)
maxIfEmpty in interface CharIterablepublic double average()
average in interface CharIterablepublic double median()
median in interface CharIterablepublic MutableCharList toSortedList()
toSortedList in interface CharIterablepublic char[] toSortedArray()
toSortedArray in interface CharIterablepublic char[] toArray()
toArray in interface CharIterablepublic char[] toArray(char[] target)
toArray in interface CharIterablepublic 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 MutableCharList toList()
toList in interface CharIterablepublic MutableCharSet toSet()
toSet in interface CharIterablepublic MutableCharBag toBag()
toBag in interface CharIterablepublic boolean equals(Object otherStack)
public int hashCode()
public LazyCharIterable asLazy()
asLazy in interface CharIterablepublic MutableCharStack asUnmodifiable()
asUnmodifiable in interface MutableCharStackpublic MutableCharStack asSynchronized()
asSynchronized in interface MutableCharStackpublic ImmutableCharStack toImmutable()
toImmutable in interface CharStackpublic MutableCharStack newEmpty()
newEmpty in interface MutableCharStackpublic <T> T injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function)
injectInto in interface CharIterablepublic RichIterable<CharIterable> chunk(int size)
chunk in interface CharIterablepublic char getFirst()
getFirst in interface OrderedCharIterablepublic int indexOf(char value)
indexOf in interface OrderedCharIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectCharIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedCharIterablepublic void forEachWithIndex(CharIntProcedure procedure)
forEachWithIndex in interface OrderedCharIterablepublic MutableCharStack selectWithIndex(CharIntPredicate predicate)
selectWithIndex in interface OrderedCharIterableselectWithIndex in interface CharStackselectWithIndex in interface MutableCharStackpublic <R extends MutableCharCollection> R selectWithIndex(CharIntPredicate predicate, R target)
selectWithIndex in interface OrderedCharIterablepublic MutableCharStack rejectWithIndex(CharIntPredicate predicate)
rejectWithIndex in interface OrderedCharIterablerejectWithIndex in interface CharStackrejectWithIndex in interface MutableCharStackpublic <R extends MutableCharCollection> R rejectWithIndex(CharIntPredicate predicate, R target)
rejectWithIndex in interface OrderedCharIterablepublic <V> MutableStack<V> collectWithIndex(CharIntToObjectFunction<? extends V> function)
collectWithIndex in interface OrderedCharIterablecollectWithIndex in interface CharStackcollectWithIndex in interface MutableCharStackpublic <V,R extends Collection<V>> R collectWithIndex(CharIntToObjectFunction<? extends V> function, R target)
collectWithIndex in interface OrderedCharIterableCopyright © 2004–2022. All rights reserved.