Class ImmutableBooleanArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack
-
- org.eclipse.collections.impl.stack.immutable.primitive.ImmutableBooleanArrayStack
-
- All Implemented Interfaces:
java.io.Serializable,BooleanIterable,OrderedBooleanIterable,PrimitiveIterable,BooleanStack,ImmutableBooleanStack
final class ImmutableBooleanArrayStack extends AbstractBooleanStack implements ImmutableBooleanStack, java.io.Serializable
ImmutableBooleanArrayStack is the non-modifiable equivalent ofBooleanArrayStack. 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 classImmutableBooleanArrayStack.ImmutableBooleanStackSerializationProxy
-
Field Summary
Fields Modifier and Type Field Description private BooleanArrayListdelegateprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateImmutableBooleanArrayStack(boolean[] newElements)privateImmutableBooleanArrayStack(BooleanArrayList 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(BooleanToObjectFunction<? extends V> function)Returns a new collection with the results of applying the specified function on each element of the source collection.protected BooleanArrayListgetDelegate()booleanisEmpty()Returns true if this iterable has zero items.static ImmutableBooleanArrayStacknewStack(BooleanIterable iterable)static ImmutableBooleanArrayStacknewStackFromTopToBottom(boolean... items)static ImmutableBooleanArrayStacknewStackFromTopToBottom(BooleanIterable items)static ImmutableBooleanArrayStacknewStackWith(boolean... elements)booleannotEmpty()The English equivalent of !this.isEmpty()ImmutableBooleanStackpop()ImmutableBooleanStackpop(int count)ImmutableBooleanStackpush(boolean item)ImmutableBooleanStackreject(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.ImmutableBooleanStackselect(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.ImmutableBooleanStacktoImmutable()MutableBooleanStacktoStack()Converts the collection to a BooleanStack.private java.lang.ObjectwriteReplace()-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.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, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.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, toSet
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.BooleanStack
equals, hashCode, peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.ImmutableBooleanStack
collectWithIndex, rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable
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 BooleanArrayList delegate
-
-
Constructor Detail
-
ImmutableBooleanArrayStack
private ImmutableBooleanArrayStack(boolean[] newElements)
-
ImmutableBooleanArrayStack
private ImmutableBooleanArrayStack(BooleanArrayList newElements)
-
-
Method Detail
-
checkOptimizedSize
private void checkOptimizedSize(int length)
-
newStack
public static ImmutableBooleanArrayStack newStack(BooleanIterable iterable)
-
newStackWith
public static ImmutableBooleanArrayStack newStackWith(boolean... elements)
-
newStackFromTopToBottom
public static ImmutableBooleanArrayStack newStackFromTopToBottom(boolean... items)
-
newStackFromTopToBottom
public static ImmutableBooleanArrayStack newStackFromTopToBottom(BooleanIterable items)
-
getDelegate
protected BooleanArrayList getDelegate()
- Specified by:
getDelegatein classAbstractBooleanStack
-
push
public ImmutableBooleanStack push(boolean item)
- Specified by:
pushin interfaceImmutableBooleanStack
-
pop
public ImmutableBooleanStack pop()
- Specified by:
popin interfaceImmutableBooleanStack
-
pop
public ImmutableBooleanStack pop(int count)
- Specified by:
popin interfaceImmutableBooleanStack
-
checkNegativeCount
private void checkNegativeCount(int count)
-
select
public ImmutableBooleanStack select(BooleanPredicate predicate)
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
public ImmutableBooleanStack reject(BooleanPredicate predicate)
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
public <V> ImmutableStack<V> collect(BooleanToObjectFunction<? extends V> function)
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
public ImmutableBooleanStack 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
private java.lang.Object writeReplace()
-
toStack
public MutableBooleanStack toStack()
Description copied from interface:OrderedBooleanIterableConverts the collection to a BooleanStack.- Specified by:
toStackin interfaceOrderedBooleanIterable
-
-