Class SynchronizedCharStack
java.lang.Object
org.eclipse.collections.impl.stack.mutable.primitive.SynchronizedCharStack
- All Implemented Interfaces:
Serializable,CharIterable,OrderedCharIterable,PrimitiveIterable,CharStack,MutableCharStack
A synchronized view of a
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.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(CharPredicate predicate) booleananySatisfy(CharPredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()doubleaverage()Must be called in a synchronized block.chunk(int size) voidclear()<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>>
RcollectWithIndex(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.booleancontains(char value) booleancontainsAll(char... source) booleancontainsAll(CharIterable source) intcount(CharPredicate predicate) chardetectIfNone(CharPredicate predicate, char ifNone) voideach(CharProcedure procedure) booleanvoidforEachWithIndex(CharIntProcedure procedure) chargetFirst()inthashCode()intindexOf(char value) <T> TinjectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T, ? extends T> function) booleanisEmpty()makeString(String separator) makeString(String start, String separator, String end) charmax()charmaxIfEmpty(char defaultValue) doublemedian()charmin()charminIfEmpty(char defaultValue) newEmpty()booleannoneSatisfy(CharPredicate predicate) booleannotEmpty()charpeek()peek(int count) charpeekAt(int index) charpop()pop(int count) voidpush(char item) reject(CharPredicate predicate) rejectWithIndex(CharIntPredicate predicate) Returns a new MutableCharStack excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableCharCollection>
RrejectWithIndex(CharIntPredicate predicate, R target) Returns a new MutableCharCollection excluding all elements with corresponding indexes matching the specified predicate.select(CharPredicate predicate) selectWithIndex(CharIntPredicate predicate) Returns a new MutableCharStack including all elements with corresponding indexes matching the specified predicate.<R extends MutableCharCollection>
RselectWithIndex(CharIntPredicate predicate, R target) Returns a new MutableCharCollection including all elements with corresponding indexes matching the specified predicate.intsize()longsum()char[]toArray()char[]toArray(char[] target) toBag()toList()toSet()char[]toStack()toString()Methods inherited from interface org.eclipse.collections.api.CharIterable
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, toSortedListByMethods inherited from interface org.eclipse.collections.api.stack.primitive.MutableCharStack
tap
-
Constructor Details
-
SynchronizedCharStack
-
SynchronizedCharStack
-
-
Method Details
-
push
public void push(char item) - Specified by:
pushin interfaceMutableCharStack
-
pop
public char pop()- Specified by:
popin interfaceMutableCharStack
-
pop
- Specified by:
popin interfaceMutableCharStack
-
peek
public char peek() -
peek
-
peekAt
public char peekAt(int index) -
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 interfaceMutableCharStack
-
contains
public boolean contains(char value) - Specified by:
containsin interfaceCharIterable
-
containsAll
public boolean containsAll(char... source) - Specified by:
containsAllin interfaceCharIterable
-
containsAll
- Specified by:
containsAllin interfaceCharIterable
-
charIterator
Must be called in a synchronized block.- Specified by:
charIteratorin interfaceCharIterable
-
each
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
count
- Specified by:
countin interfaceCharIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceCharIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceCharIterable
-
select
- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceCharStack- Specified by:
selectin interfaceMutableCharStack- Specified by:
selectin interfaceOrderedCharIterable
-
reject
- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceCharStack- Specified by:
rejectin interfaceMutableCharStack- Specified by:
rejectin interfaceOrderedCharIterable
-
collect
- Specified by:
collectin interfaceCharIterable- Specified by:
collectin interfaceCharStack- Specified by:
collectin interfaceMutableCharStack- Specified by:
collectin interfaceOrderedCharIterable
-
sum
public long sum()- Specified by:
sumin interfaceCharIterable
-
max
public char max()- Specified by:
maxin interfaceCharIterable
-
min
public char min()- Specified by:
minin interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char defaultValue) - Specified by:
minIfEmptyin interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char defaultValue) - Specified by:
maxIfEmptyin interfaceCharIterable
-
average
public double average()- Specified by:
averagein interfaceCharIterable
-
median
public double median()- Specified by:
medianin interfaceCharIterable
-
toSortedList
- Specified by:
toSortedListin interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()- Specified by:
toSortedArrayin interfaceCharIterable
-
toArray
public char[] toArray()- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] target) - Specified by:
toArrayin interfaceCharIterable
-
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 interfaceCharIterable
-
toSet
- Specified by:
toSetin interfaceCharIterable
-
toBag
- Specified by:
toBagin interfaceCharIterable
-
equals
-
hashCode
public int hashCode() -
asLazy
- Specified by:
asLazyin interfaceCharIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableCharStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableCharStack
-
toImmutable
- Specified by:
toImmutablein interfaceCharStack
-
newEmpty
- Specified by:
newEmptyin interfaceMutableCharStack- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceCharIterable
-
chunk
- Specified by:
chunkin interfaceCharIterable
-
getFirst
public char getFirst()- Specified by:
getFirstin interfaceOrderedCharIterable
-
indexOf
public int indexOf(char value) - Specified by:
indexOfin interfaceOrderedCharIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedCharIterable
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedCharIterable
-
selectWithIndex
Returns a new MutableCharStack including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceCharStack- Specified by:
selectWithIndexin interfaceMutableCharStack- Specified by:
selectWithIndexin interfaceOrderedCharIterable- Since:
- 11.1.
-
selectWithIndex
Returns a new MutableCharCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedCharIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableCharStack excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceCharStack- Specified by:
rejectWithIndexin interfaceMutableCharStack- Specified by:
rejectWithIndexin interfaceOrderedCharIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableCharCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedCharIterable- 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 interfaceCharStack- Specified by:
collectWithIndexin interfaceMutableCharStack- Specified by:
collectWithIndexin interfaceOrderedCharIterable- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R 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.- Specified by:
collectWithIndexin interfaceOrderedCharIterable- Since:
- 9.1.
-
toStack
- Specified by:
toStackin interfaceOrderedCharIterable
-