Class ImmutableCharArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractCharStack
-
- org.eclipse.collections.impl.stack.immutable.primitive.ImmutableCharArrayStack
-
- All Implemented Interfaces:
java.io.Serializable
,CharIterable
,OrderedCharIterable
,PrimitiveIterable
,CharStack
,ImmutableCharStack
final class ImmutableCharArrayStack extends AbstractCharStack implements ImmutableCharStack, java.io.Serializable
ImmutableCharArrayStack is the non-modifiable equivalent ofCharArrayStack
. This file was automatically generated from template file immutablePrimitiveArrayStack.stg.- Since:
- 4.0.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ImmutableCharArrayStack.ImmutableCharStackSerializationProxy
-
Field Summary
Fields Modifier and Type Field Description private CharArrayList
delegate
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
ImmutableCharArrayStack(char[] newElements)
private
ImmutableCharArrayStack(CharArrayList newElements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkNegativeCount(int count)
private void
checkOptimizedSize(int length)
<V> ImmutableStack<V>
collect(CharToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.protected CharArrayList
getDelegate()
boolean
isEmpty()
Returns true if this iterable has zero items.static ImmutableCharArrayStack
newStack(CharIterable iterable)
static ImmutableCharArrayStack
newStackFromTopToBottom(char... items)
static ImmutableCharArrayStack
newStackFromTopToBottom(CharIterable items)
static ImmutableCharArrayStack
newStackWith(char... elements)
boolean
notEmpty()
The English equivalent of !this.isEmpty()ImmutableCharStack
pop()
ImmutableCharStack
pop(int count)
ImmutableCharStack
push(char item)
ImmutableCharStack
reject(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.ImmutableCharStack
select(CharPredicate predicate)
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.ImmutableCharStack
toImmutable()
MutableCharList
toSortedList()
private java.lang.Object
writeReplace()
-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.AbstractCharStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, charIterator, checkEmptyStack, checkPositiveValueForCount, checkSizeLessThanCount, chunk, contains, containsAll, containsAll, count, detectIfNone, each, equals, forEachWithIndex, getFirst, hashCode, indexOf, injectInto, injectIntoWithIndex, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, peek, peek, peekAt, rangeCheck, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, charIterator, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.CharStack
equals, hashCode, peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.ImmutableCharStack
collectWithIndex, rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedCharIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, injectIntoWithIndex, rejectWithIndex, selectWithIndex
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, makeString, makeString, makeString, size, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
delegate
private final CharArrayList delegate
-
-
Constructor Detail
-
ImmutableCharArrayStack
private ImmutableCharArrayStack(char[] newElements)
-
ImmutableCharArrayStack
private ImmutableCharArrayStack(CharArrayList newElements)
-
-
Method Detail
-
checkOptimizedSize
private void checkOptimizedSize(int length)
-
newStack
public static ImmutableCharArrayStack newStack(CharIterable iterable)
-
newStackWith
public static ImmutableCharArrayStack newStackWith(char... elements)
-
newStackFromTopToBottom
public static ImmutableCharArrayStack newStackFromTopToBottom(char... items)
-
newStackFromTopToBottom
public static ImmutableCharArrayStack newStackFromTopToBottom(CharIterable items)
-
getDelegate
protected CharArrayList getDelegate()
- Specified by:
getDelegate
in classAbstractCharStack
-
push
public ImmutableCharStack push(char item)
- Specified by:
push
in interfaceImmutableCharStack
-
pop
public ImmutableCharStack pop()
- Specified by:
pop
in interfaceImmutableCharStack
-
pop
public ImmutableCharStack pop(int count)
- Specified by:
pop
in interfaceImmutableCharStack
-
checkNegativeCount
private void checkNegativeCount(int count)
-
select
public ImmutableCharStack select(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceCharStack
- Specified by:
select
in interfaceImmutableCharStack
- Specified by:
select
in interfaceOrderedCharIterable
-
reject
public ImmutableCharStack reject(CharPredicate predicate)
Description copied from interface:CharIterable
Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceCharStack
- Specified by:
reject
in interfaceImmutableCharStack
- Specified by:
reject
in interfaceOrderedCharIterable
-
collect
public <V> ImmutableStack<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceCharStack
- Specified by:
collect
in interfaceImmutableCharStack
- Specified by:
collect
in interfaceOrderedCharIterable
-
toImmutable
public ImmutableCharStack toImmutable()
- Specified by:
toImmutable
in interfaceCharStack
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedList
in interfaceCharIterable
-
writeReplace
private java.lang.Object writeReplace()
-
-