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 class
ImmutableBooleanArrayStack.ImmutableBooleanStackSerializationProxy
-
Field Summary
Fields Modifier and Type Field Description private BooleanArrayList
delegate
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
ImmutableBooleanArrayStack(boolean[] newElements)
private
ImmutableBooleanArrayStack(BooleanArrayList 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(BooleanToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.protected BooleanArrayList
getDelegate()
boolean
isEmpty()
Returns true if this iterable has zero items.static ImmutableBooleanArrayStack
newStack(BooleanIterable iterable)
static ImmutableBooleanArrayStack
newStackFromTopToBottom(boolean... items)
static ImmutableBooleanArrayStack
newStackFromTopToBottom(BooleanIterable items)
static ImmutableBooleanArrayStack
newStackWith(boolean... elements)
boolean
notEmpty()
The English equivalent of !this.isEmpty()ImmutableBooleanStack
pop()
ImmutableBooleanStack
pop(int count)
ImmutableBooleanStack
push(boolean item)
ImmutableBooleanStack
reject(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.ImmutableBooleanStack
select(BooleanPredicate predicate)
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.ImmutableBooleanStack
toImmutable()
private java.lang.Object
writeReplace()
-
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:
getDelegate
in classAbstractBooleanStack
-
push
public ImmutableBooleanStack push(boolean item)
- Specified by:
push
in interfaceImmutableBooleanStack
-
pop
public ImmutableBooleanStack pop()
- Specified by:
pop
in interfaceImmutableBooleanStack
-
pop
public ImmutableBooleanStack pop(int count)
- Specified by:
pop
in interfaceImmutableBooleanStack
-
checkNegativeCount
private void checkNegativeCount(int count)
-
select
public ImmutableBooleanStack select(BooleanPredicate predicate)
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.- Specified by:
select
in interfaceBooleanIterable
- Specified by:
select
in interfaceBooleanStack
- Specified by:
select
in interfaceImmutableBooleanStack
- Specified by:
select
in interfaceOrderedBooleanIterable
-
reject
public ImmutableBooleanStack reject(BooleanPredicate predicate)
Description copied from interface:BooleanIterable
Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.- Specified by:
reject
in interfaceBooleanIterable
- Specified by:
reject
in interfaceBooleanStack
- Specified by:
reject
in interfaceImmutableBooleanStack
- Specified by:
reject
in interfaceOrderedBooleanIterable
-
collect
public <V> ImmutableStack<V> collect(BooleanToObjectFunction<? extends V> function)
Description copied from interface:BooleanIterable
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 interfaceBooleanIterable
- Specified by:
collect
in interfaceBooleanStack
- Specified by:
collect
in interfaceImmutableBooleanStack
- Specified by:
collect
in interfaceOrderedBooleanIterable
-
toImmutable
public ImmutableBooleanStack toImmutable()
- Specified by:
toImmutable
in interfaceBooleanStack
-
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
-
writeReplace
private java.lang.Object writeReplace()
-
-