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 classImmutableCharArrayStack.ImmutableCharStackSerializationProxy
-
Field Summary
Fields Modifier and Type Field Description private CharArrayListdelegateprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableCharArrayStack(char[] newElements)privateImmutableCharArrayStack(CharArrayList newElements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckNegativeCount(int count)private voidcheckOptimizedSize(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 CharArrayListgetDelegate()booleanisEmpty()Returns true if this iterable has zero items.static ImmutableCharArrayStacknewStack(CharIterable iterable)static ImmutableCharArrayStacknewStackFromTopToBottom(char... items)static ImmutableCharArrayStacknewStackFromTopToBottom(CharIterable items)static ImmutableCharArrayStacknewStackWith(char... elements)booleannotEmpty()The English equivalent of !this.isEmpty()ImmutableCharStackpop()ImmutableCharStackpop(int count)ImmutableCharStackpush(char item)ImmutableCharStackreject(CharPredicate predicate)Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.ImmutableCharStackselect(CharPredicate predicate)Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.ImmutableCharStacktoImmutable()MutableCharListtoSortedList()MutableCharStacktoStack()Converts the collection to a CharStack.private java.lang.ObjectwriteReplace()-
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:
getDelegatein classAbstractCharStack
-
push
public ImmutableCharStack push(char item)
- Specified by:
pushin interfaceImmutableCharStack
-
pop
public ImmutableCharStack pop()
- Specified by:
popin interfaceImmutableCharStack
-
pop
public ImmutableCharStack pop(int count)
- Specified by:
popin interfaceImmutableCharStack
-
checkNegativeCount
private void checkNegativeCount(int count)
-
select
public ImmutableCharStack select(CharPredicate predicate)
Description copied from interface:CharIterableReturns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceCharStack- Specified by:
selectin interfaceImmutableCharStack- Specified by:
selectin interfaceOrderedCharIterable
-
reject
public ImmutableCharStack reject(CharPredicate predicate)
Description copied from interface:CharIterableReturns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceCharStack- Specified by:
rejectin interfaceImmutableCharStack- Specified by:
rejectin interfaceOrderedCharIterable
-
collect
public <V> ImmutableStack<V> collect(CharToObjectFunction<? extends V> function)
Description copied from interface:CharIterableReturns 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:
collectin interfaceCharIterable- Specified by:
collectin interfaceCharStack- Specified by:
collectin interfaceImmutableCharStack- Specified by:
collectin interfaceOrderedCharIterable
-
toImmutable
public ImmutableCharStack toImmutable()
- Specified by:
toImmutablein interfaceCharStack
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedListin interfaceCharIterable
-
writeReplace
private java.lang.Object writeReplace()
-
toStack
public MutableCharStack toStack()
Description copied from interface:OrderedCharIterableConverts the collection to a CharStack.- Specified by:
toStackin interfaceOrderedCharIterable
-
-