Class BooleanArrayStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack
-
- org.eclipse.collections.impl.stack.mutable.primitive.BooleanArrayStack
-
- All Implemented Interfaces:
Externalizable,Serializable,BooleanIterable,OrderedBooleanIterable,PrimitiveIterable,BooleanStack,MutableBooleanStack
public class BooleanArrayStack extends AbstractBooleanStack implements MutableBooleanStack, Externalizable
BooleanArrayStack is similar toArrayStack, and is memory-optimized for boolean primitives. This file was automatically generated from template file primitiveArrayStack.stg.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BooleanArrayStack()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableBooleanStackasSynchronized()MutableBooleanStackasUnmodifiable()voidclear()<V> MutableStack<V>collect(BooleanToObjectFunction<? extends V> function)booleanequals(Object otherStack)inthashCode()BooleanArrayStacknewEmpty()Creates a new empty BooleanArrayStack.static BooleanArrayStacknewStack(BooleanIterable items)static BooleanArrayStacknewStackFromTopToBottom(boolean... items)static BooleanArrayStacknewStackFromTopToBottom(BooleanIterable items)static BooleanArrayStacknewStackWith(boolean... items)booleanpop()BooleanListpop(int count)voidpush(boolean item)voidreadExternal(ObjectInput in)MutableBooleanStackreject(BooleanPredicate predicate)MutableBooleanStackselect(BooleanPredicate predicate)ImmutableBooleanStacktoImmutable()voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, booleanIterator, chunk, contains, containsAll, containsAll, count, detectIfNone, each, forEachWithIndex, getFirst, indexOf, injectInto, injectIntoWithIndex, makeString, makeString, makeString, noneSatisfy, peek, peek, peekAt, size, toArray, toArray, toBag, toList, toSet, toString
-
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
peek, peek, peekAt
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableBooleanStack
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, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Method Detail
-
newStackFromTopToBottom
public static BooleanArrayStack newStackFromTopToBottom(boolean... items)
-
newStackWith
public static BooleanArrayStack newStackWith(boolean... items)
-
newStack
public static BooleanArrayStack newStack(BooleanIterable items)
-
newStackFromTopToBottom
public static BooleanArrayStack newStackFromTopToBottom(BooleanIterable items)
-
push
public void push(boolean item)
- Specified by:
pushin interfaceMutableBooleanStack
-
pop
public boolean pop()
- Specified by:
popin interfaceMutableBooleanStack
-
pop
public BooleanList pop(int count)
- Specified by:
popin interfaceMutableBooleanStack
-
select
public MutableBooleanStack select(BooleanPredicate predicate)
- Specified by:
selectin interfaceBooleanIterable- Specified by:
selectin interfaceBooleanStack- Specified by:
selectin interfaceMutableBooleanStack- Specified by:
selectin interfaceOrderedBooleanIterable
-
reject
public MutableBooleanStack reject(BooleanPredicate predicate)
- Specified by:
rejectin interfaceBooleanIterable- Specified by:
rejectin interfaceBooleanStack- Specified by:
rejectin interfaceMutableBooleanStack- Specified by:
rejectin interfaceOrderedBooleanIterable
-
collect
public <V> MutableStack<V> collect(BooleanToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceBooleanIterable- Specified by:
collectin interfaceBooleanStack- Specified by:
collectin interfaceMutableBooleanStack- Specified by:
collectin interfaceOrderedBooleanIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableBooleanStack
-
asUnmodifiable
public MutableBooleanStack asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableBooleanStack
-
asSynchronized
public MutableBooleanStack asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableBooleanStack
-
toImmutable
public ImmutableBooleanStack toImmutable()
- Specified by:
toImmutablein interfaceBooleanStack
-
newEmpty
public BooleanArrayStack newEmpty()
Creates a new empty BooleanArrayStack.- Specified by:
newEmptyin interfaceMutableBooleanStack- Since:
- 9.2.
-
equals
public boolean equals(Object otherStack)
- Specified by:
equalsin interfaceBooleanStack- Overrides:
equalsin classAbstractBooleanStack
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceBooleanStack- Overrides:
hashCodein classAbstractBooleanStack
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
-