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 to
ArrayStack, 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
Modifier and Type Method Description MutableBooleanStackasSynchronized()MutableBooleanStackasUnmodifiable()voidclear()Clears the Stack<V> MutableStack<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.booleanequals(Object otherStack)Follows the same general contract asStackIterable.equals(Object).inthashCode()Follows the same general contract asStackIterable.hashCode().BooleanArrayStacknewEmpty()Creates a new empty BooleanArrayStack.static BooleanArrayStacknewStack(BooleanIterable items)static BooleanArrayStacknewStackFromTopToBottom(boolean... items)static BooleanArrayStacknewStackFromTopToBottom(BooleanIterable items)static BooleanArrayStacknewStackWith(boolean... items)booleanpop()Removes and returns the top element of the stack.BooleanListpop(int count)Removes and returns a BooleanList of the number of elements specified by the count, beginning with the top of the stack.voidpush(boolean item)Adds an item to the top of the stack.voidreadExternal(ObjectInput in)MutableBooleanStackreject(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.MutableBooleanStackselect(BooleanPredicate predicate)Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified 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, forEach, forEachWithIndex, getFirst, indexOf, injectInto, injectIntoWithIndex, makeString, makeString, makeString, noneSatisfy, peek, peek, peekAt, size, toArray, toArray, toBag, toList, toSet, toStringMethods 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, count, detectIfNone, each, flatCollect, forEach, injectInto, noneSatisfy, reduce, reduceIfEmpty, reject, select, toArray, toArray, toBag, toList, toSetMethods inherited from interface org.eclipse.collections.api.stack.primitive.BooleanStack
peek, peek, peekAtMethods inherited from interface org.eclipse.collections.api.stack.primitive.MutableBooleanStack
collectWithIndex, tapMethods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf, injectIntoWithIndexMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
BooleanArrayStack
public BooleanArrayStack()
-
-
Method Details
-
newStackFromTopToBottom
-
newStackWith
-
newStack
-
newStackFromTopToBottom
-
push
public void push(boolean item)Description copied from interface:MutableBooleanStackAdds an item to the top of the stack.- Specified by:
pushin interfaceMutableBooleanStack
-
pop
public boolean pop()Description copied from interface:MutableBooleanStackRemoves and returns the top element of the stack.- Specified by:
popin interfaceMutableBooleanStack
-
pop
Description copied from interface:MutableBooleanStackRemoves and returns a BooleanList of the number of elements specified by the count, beginning with the top of the stack.- Specified by:
popin interfaceMutableBooleanStack
-
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 interfaceMutableBooleanStack- 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 interfaceMutableBooleanStack- 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 interfaceMutableBooleanStack- Specified by:
collectin interfaceOrderedBooleanIterable
-
clear
public void clear()Description copied from interface:MutableBooleanStackClears the Stack- Specified by:
clearin interfaceMutableBooleanStack
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableBooleanStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableBooleanStack
-
toImmutable
- Specified by:
toImmutablein interfaceBooleanStack
-
newEmpty
Creates a new empty BooleanArrayStack.- Specified by:
newEmptyin interfaceMutableBooleanStack- Since:
- 9.2.
-
equals
Description copied from interface:BooleanStackFollows the same general contract asStackIterable.equals(Object).- Specified by:
equalsin interfaceBooleanStack- Overrides:
equalsin classAbstractBooleanStack
-
hashCode
public int hashCode()Description copied from interface:BooleanStackFollows the same general contract asStackIterable.hashCode().- Specified by:
hashCodein interfaceBooleanStack- Overrides:
hashCodein classAbstractBooleanStack
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-