Class ImmutableCharArrayStack
java.lang.Object
org.eclipse.collections.impl.stack.primitive.AbstractCharStack
org.eclipse.collections.impl.stack.immutable.primitive.ImmutableCharArrayStack
- All Implemented Interfaces:
Serializable
,CharIterable
,OrderedCharIterable
,PrimitiveIterable
,CharStack
,ImmutableCharStack
final class ImmutableCharArrayStack
extends AbstractCharStack
implements ImmutableCharStack, Serializable
ImmutableCharArrayStack is the non-modifiable equivalent of
CharArrayStack
.
This file was automatically generated from template file immutablePrimitiveArrayStack.stg.- Since:
- 4.0.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ImmutableCharArrayStack
(char[] newElements) private
ImmutableCharArrayStack
(CharArrayList newElements) -
Method Summary
Modifier and TypeMethodDescriptionprivate 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
boolean
isEmpty()
Returns true if this iterable has zero items.static ImmutableCharArrayStack
newStack
(CharIterable iterable) static ImmutableCharArrayStack
newStackFromTopToBottom
(char... items) static ImmutableCharArrayStack
static ImmutableCharArrayStack
newStackWith
(char... elements) boolean
notEmpty()
The English equivalent of !this.isEmpty()pop()
pop
(int count) push
(char item) reject
(CharPredicate predicate) Returns a new CharIterable with all of the elements in the CharIterable that return false for the specified predicate.select
(CharPredicate predicate) Returns a new CharIterable with all of the elements in the CharIterable that return true for the specified predicate.private Object
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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
delegate
-
-
Constructor Details
-
ImmutableCharArrayStack
private ImmutableCharArrayStack(char[] newElements) -
ImmutableCharArrayStack
-
-
Method Details
-
checkOptimizedSize
private void checkOptimizedSize(int length) -
newStack
-
newStackWith
-
newStackFromTopToBottom
-
newStackFromTopToBottom
-
getDelegate
- Specified by:
getDelegate
in classAbstractCharStack
-
push
- Specified by:
push
in interfaceImmutableCharStack
-
pop
- Specified by:
pop
in interfaceImmutableCharStack
-
pop
- Specified by:
pop
in interfaceImmutableCharStack
-
checkNegativeCount
private void checkNegativeCount(int count) -
select
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
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
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
- 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
- Specified by:
toSortedList
in interfaceCharIterable
-
writeReplace
-