Class UnmodifiableCharStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.mutable.primitive.UnmodifiableCharStack
-
- All Implemented Interfaces:
Serializable,CharIterable,OrderedCharIterable,PrimitiveIterable,CharStack,MutableCharStack
public class UnmodifiableCharStack extends Object implements MutableCharStack, Serializable
This file was automatically generated from template file unmodifiablePrimitiveStack.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableCharStack(MutableCharStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallSatisfy(CharPredicate predicate)booleananySatisfy(CharPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyCharIterableasLazy()MutableCharStackasSynchronized()MutableCharStackasUnmodifiable()doubleaverage()CharIteratorcharIterator()RichIterable<CharIterable>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)booleanequals(Object otherStack)voidforEachWithIndex(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()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)charmax()charmaxIfEmpty(char defaultValue)doublemedian()charmin()charminIfEmpty(char defaultValue)MutableCharStacknewEmpty()booleannoneSatisfy(CharPredicate predicate)booleannotEmpty()charpeek()CharListpeek(int count)charpeekAt(int index)charpop()CharListpop(int count)voidpush(char item)MutableCharStackreject(CharPredicate predicate)MutableCharStackselect(CharPredicate predicate)intsize()longsum()char[]toArray()char[]toArray(char[] target)MutableCharBagtoBag()ImmutableCharStacktoImmutable()MutableCharListtoList()MutableCharSettoSet()char[]toSortedArray()MutableCharListtoSortedList()StringtoString()-
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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableCharStack
rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedCharIterable
rejectWithIndex, selectWithIndex
-
-
-
-
Constructor Detail
-
UnmodifiableCharStack
public UnmodifiableCharStack(MutableCharStack stack)
-
-
Method Detail
-
push
public void push(char item)
- Specified by:
pushin interfaceMutableCharStack
-
pop
public char pop()
- Specified by:
popin interfaceMutableCharStack
-
pop
public CharList pop(int count)
- Specified by:
popin interfaceMutableCharStack
-
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
public boolean containsAll(CharIterable source)
- Specified by:
containsAllin interfaceCharIterable
-
charIterator
public CharIterator charIterator()
- Specified by:
charIteratorin interfaceCharIterable
-
each
public void each(CharProcedure procedure)
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
count
public int count(CharPredicate predicate)
- Specified by:
countin interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
- Specified by:
noneSatisfyin interfaceCharIterable
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNonein interfaceCharIterable
-
select
public MutableCharStack select(CharPredicate predicate)
- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceCharStack- Specified by:
selectin interfaceMutableCharStack- Specified by:
selectin interfaceOrderedCharIterable
-
reject
public MutableCharStack reject(CharPredicate predicate)
- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceCharStack- Specified by:
rejectin interfaceMutableCharStack- Specified by:
rejectin interfaceOrderedCharIterable
-
collect
public <V> MutableStack<V> collect(CharToObjectFunction<? extends V> function)
- 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
public MutableCharList 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
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
public MutableCharList toList()
- Specified by:
toListin interfaceCharIterable
-
toSet
public MutableCharSet toSet()
- Specified by:
toSetin interfaceCharIterable
-
toBag
public MutableCharBag toBag()
- Specified by:
toBagin interfaceCharIterable
-
equals
public boolean equals(Object otherStack)
-
hashCode
public int hashCode()
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazyin interfaceCharIterable
-
asUnmodifiable
public MutableCharStack asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableCharStack
-
asSynchronized
public MutableCharStack asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableCharStack
-
toImmutable
public ImmutableCharStack toImmutable()
- Specified by:
toImmutablein interfaceCharStack
-
newEmpty
public MutableCharStack 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
public RichIterable<CharIterable> chunk(int size)
- 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
public void forEachWithIndex(CharIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedCharIterable
-
collectWithIndex
public <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.- 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.
-
-