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 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()
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>>
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.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
select(CharPredicate 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()
-
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:
push
in interfaceMutableCharStack
-
pop
public char pop()
- Specified by:
pop
in interfaceMutableCharStack
-
pop
public CharList pop(int count)
- Specified by:
pop
in interfaceMutableCharStack
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableCharStack
-
contains
public boolean contains(char value)
- Specified by:
contains
in interfaceCharIterable
-
containsAll
public boolean containsAll(char... source)
- Specified by:
containsAll
in interfaceCharIterable
-
containsAll
public boolean containsAll(CharIterable source)
- Specified by:
containsAll
in interfaceCharIterable
-
charIterator
public CharIterator charIterator()
- Specified by:
charIterator
in interfaceCharIterable
-
each
public void each(CharProcedure procedure)
- Specified by:
each
in interfaceCharIterable
- Since:
- 7.0.
-
count
public int count(CharPredicate predicate)
- Specified by:
count
in interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfy
in interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfy
in interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
- Specified by:
noneSatisfy
in interfaceCharIterable
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNone
in interfaceCharIterable
-
select
public MutableCharStack select(CharPredicate predicate)
- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceCharStack
- Specified by:
select
in interfaceMutableCharStack
- Specified by:
select
in interfaceOrderedCharIterable
-
reject
public MutableCharStack reject(CharPredicate predicate)
- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceCharStack
- Specified by:
reject
in interfaceMutableCharStack
- Specified by:
reject
in interfaceOrderedCharIterable
-
collect
public <V> MutableStack<V> collect(CharToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceCharStack
- Specified by:
collect
in interfaceMutableCharStack
- Specified by:
collect
in interfaceOrderedCharIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceCharIterable
-
max
public char max()
- Specified by:
max
in interfaceCharIterable
-
min
public char min()
- Specified by:
min
in interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char defaultValue)
- Specified by:
minIfEmpty
in interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char defaultValue)
- Specified by:
maxIfEmpty
in interfaceCharIterable
-
average
public double average()
- Specified by:
average
in interfaceCharIterable
-
median
public double median()
- Specified by:
median
in interfaceCharIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedList
in interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()
- Specified by:
toSortedArray
in interfaceCharIterable
-
toArray
public char[] toArray()
- Specified by:
toArray
in interfaceCharIterable
-
toArray
public char[] toArray(char[] target)
- Specified by:
toArray
in interfaceCharIterable
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classObject
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
toList
public MutableCharList toList()
- Specified by:
toList
in interfaceCharIterable
-
toSet
public MutableCharSet toSet()
- Specified by:
toSet
in interfaceCharIterable
-
toBag
public MutableCharBag toBag()
- Specified by:
toBag
in interfaceCharIterable
-
equals
public boolean equals(Object otherStack)
-
hashCode
public int hashCode()
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazy
in interfaceCharIterable
-
asUnmodifiable
public MutableCharStack asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharStack
-
asSynchronized
public MutableCharStack asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharStack
-
toImmutable
public ImmutableCharStack toImmutable()
- Specified by:
toImmutable
in interfaceCharStack
-
newEmpty
public MutableCharStack newEmpty()
- Specified by:
newEmpty
in interfaceMutableCharStack
- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectCharToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
- Specified by:
chunk
in interfaceCharIterable
-
getFirst
public char getFirst()
- Specified by:
getFirst
in interfaceOrderedCharIterable
-
indexOf
public int indexOf(char value)
- Specified by:
indexOf
in interfaceOrderedCharIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectCharIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedCharIterable
-
forEachWithIndex
public void forEachWithIndex(CharIntProcedure procedure)
- Specified by:
forEachWithIndex
in 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:
collectWithIndex
in interfaceCharStack
- Specified by:
collectWithIndex
in interfaceMutableCharStack
- Specified by:
collectWithIndex
in 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:
collectWithIndex
in interfaceOrderedCharIterable
- Since:
- 9.1.
-
-