Class ImmutableBooleanArrayStack
java.lang.Object
org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack
org.eclipse.collections.impl.stack.immutable.primitive.ImmutableBooleanArrayStack
- All Implemented Interfaces:
Serializable, BooleanIterable, OrderedBooleanIterable, PrimitiveIterable, BooleanStack, ImmutableBooleanStack
final class ImmutableBooleanArrayStack
extends AbstractBooleanStack
implements ImmutableBooleanStack, Serializable
ImmutableBooleanArrayStack is the non-modifiable equivalent of
BooleanArrayStack.
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
ConstructorsModifierConstructorDescriptionprivateImmutableBooleanArrayStack(boolean[] newElements) privateImmutableBooleanArrayStack(BooleanArrayList newElements) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckNegativeCount(int count) private voidcheckOptimizedSize(int length) <V> ImmutableStack<V> collect(BooleanToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.protected BooleanArrayListbooleanisEmpty()Returns true if this iterable has zero items.static ImmutableBooleanArrayStacknewStack(BooleanIterable iterable) static ImmutableBooleanArrayStacknewStackFromTopToBottom(boolean... items) static ImmutableBooleanArrayStackstatic ImmutableBooleanArrayStacknewStackWith(boolean... elements) booleannotEmpty()The English equivalent of !this.isEmpty()pop()pop(int count) push(boolean item) reject(BooleanPredicate predicate) Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.select(BooleanPredicate predicate) Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.toStack()Converts the collection to a BooleanStack.private ObjectMethods inherited from class AbstractBooleanStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, booleanIterator, checkEmptyStack, checkPositiveValueForCount, checkSizeLessThanCount, chunk, contains, containsAll, containsAll, count, detectIfNone, each, equals, forEachWithIndex, getFirst, hashCode, indexOf, injectInto, injectIntoWithIndex, makeString, makeString, makeString, noneSatisfy, peek, peek, peekAt, rangeCheck, size, toArray, toArray, toBag, toList, toSet, toStringMethods inherited from interface BooleanIterable
allSatisfy, anySatisfy, asLazy, booleanIterator, 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, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toArray, toBag, toList, toSetMethods inherited from interface ImmutableBooleanStack
collectWithIndex, rejectWithIndex, selectWithIndex, tapMethods inherited from interface OrderedBooleanIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, injectIntoWithIndex, rejectWithIndex, selectWithIndexMethods inherited from interface PrimitiveIterable
appendString, appendString, appendString, makeString, makeString, makeString, size, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
delegate
-
-
Constructor Details
-
ImmutableBooleanArrayStack
private ImmutableBooleanArrayStack(boolean[] newElements) -
ImmutableBooleanArrayStack
-
-
Method Details
-
checkOptimizedSize
private void checkOptimizedSize(int length) -
newStack
-
newStackWith
-
newStackFromTopToBottom
-
newStackFromTopToBottom
-
getDelegate
- Specified by:
getDelegatein classAbstractBooleanStack
-
push
- Specified by:
pushin interfaceImmutableBooleanStack
-
pop
- Specified by:
popin interfaceImmutableBooleanStack
-
pop
- Specified by:
popin interfaceImmutableBooleanStack
-
checkNegativeCount
private void checkNegativeCount(int count) -
select
Description copied from interface:BooleanIterableReturns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceBooleanStack- Specified by:
selectin interfaceImmutableBooleanStack- Specified by:
selectin interfaceOrderedBooleanIterable
-
reject
Description copied from interface:BooleanIterableReturns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceBooleanStack- Specified by:
rejectin interfaceImmutableBooleanStack- Specified by:
rejectin interfaceOrderedBooleanIterable
-
collect
Description copied from interface:BooleanIterableReturns 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 interfaceBooleanIterable- Specified by:
collectin interfaceBooleanStack- Specified by:
collectin interfaceImmutableBooleanStack- Specified by:
collectin interfaceOrderedBooleanIterable
-
toImmutable
- Specified by:
toImmutablein interfaceBooleanStack
-
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
-
writeReplace
-
toStack
Description copied from interface:OrderedBooleanIterableConverts the collection to a BooleanStack.- Specified by:
toStackin interfaceOrderedBooleanIterable
-