Top Description Fields Constructors Methods
org.eclipse.collections.impl.stack.mutable.primitive

public Class BooleanArrayStack

extends AbstractBooleanStack
implements MutableBooleanStack, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.stack.primitive.MutableBooleanStack, org.eclipse.collections.api.stack.primitive.BooleanStack, org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable, org.eclipse.collections.api.BooleanIterable, org.eclipse.collections.api.PrimitiveIterable
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, org.eclipse.collections.api.BooleanIterable, org.eclipse.collections.api.block.function.primitive.BooleanToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.BooleanPredicate, org.eclipse.collections.api.iterator.BooleanIterator, org.eclipse.collections.api.list.primitive.BooleanList, .MutableBooleanList, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.stack.primitive.BooleanStack, .ImmutableBooleanStack, .MutableBooleanStack, org.eclipse.collections.impl.factory.primitive.BooleanStacks, org.eclipse.collections.impl.list.mutable.primitive.BooleanArrayList, org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack, org.eclipse.collections.impl.stack.mutable.ArrayStack

BooleanArrayStack is similar to ArrayStack, and is memory-optimized for boolean primitives. This file was automatically generated from template file primitiveArrayStack.stg.

Field Summary

Modifier and TypeField and Description
private transient BooleanArrayList
private static final long

Constructor Summary

AccessConstructor and Description
public
private
private
BooleanArrayStack(boolean... items)

Method Summary

Modifier and TypeMethod and Description
public MutableBooleanStack
public MutableBooleanStack
public void
public <V> MutableStack<V>
collect(BooleanToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.collect, org.eclipse.collections.api.stack.primitive.BooleanStack.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public boolean
protected BooleanArrayList
public int
public BooleanArrayStack
newEmpty()

Overrides default org.eclipse.collections.api.stack.primitive.MutableBooleanStack.newEmpty.

Creates a new empty BooleanArrayStack.

public static BooleanArrayStack
public static BooleanArrayStack
newStackFromTopToBottom(boolean... items)

public static BooleanArrayStack
public static BooleanArrayStack
newStackWith(boolean... items)

public boolean
pop()

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.pop.

Removes and returns the top element of the stack.

public BooleanList
pop(int count)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.pop.

Removes and returns a BooleanList of the number of elements specified by the count, beginning with the top of the stack.

public void
push(boolean item)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.push.

Adds an item to the top of the stack.

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public MutableBooleanStack
reject(BooleanPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.reject, org.eclipse.collections.api.stack.primitive.BooleanStack.reject.

Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.

public MutableBooleanStack
select(BooleanPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.select, org.eclipse.collections.api.stack.primitive.BooleanStack.select.

Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.

public ImmutableBooleanStack
public MutableBooleanStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable.toStack.

Converts the collection to a BooleanStack.

public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack:
allSatisfyanySatisfyappendStringappendStringappendStringasLazybooleanIteratorcheckEmptyStackcheckPositiveValueForCountcheckSizeLessThanCountchunkcontainscontainsAllcontainsAllcountdetectIfNoneeachforEachWithIndexgetFirstindexOfinjectIntoinjectIntoWithIndexmakeStringmakeStringmakeStringnoneSatisfypeekpeekpeekAtrangeChecksizetoArraytoArraytoBagtoListtoSettoString

Field Detail

delegateback to summary
private transient BooleanArrayList delegate
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

BooleanArrayStackback to summary
public BooleanArrayStack()
BooleanArrayStackback to summary
private BooleanArrayStack(int size)
BooleanArrayStackback to summary
private BooleanArrayStack(boolean... items)

Method Detail

asSynchronizedback to summary
public MutableBooleanStack asSynchronized()

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableBooleanStack asUnmodifiable()

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.asUnmodifiable.

Annotations
@Override
clearback to summary
public void clear()

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.clear.

Doc from org.eclipse.collections.api.stack.primitive.MutableBooleanStack.clear.

Clears the Stack

Annotations
@Override
collectback to summary
public <V> MutableStack<V> collect(BooleanToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.collect, org.eclipse.collections.api.stack.primitive.BooleanStack.collect.

Doc from org.eclipse.collections.api.BooleanIterable.collect.

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.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherStack)

Overrides org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack.equals.

Implements org.eclipse.collections.api.stack.primitive.BooleanStack.equals.

Doc from org.eclipse.collections.api.stack.primitive.BooleanStack.equals.

Follows the same general contract as StackIterable#equals(Object).

Annotations
@Override
getDelegateback to summary
protected BooleanArrayList getDelegate()

Implements abstract org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack.getDelegate.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides org.eclipse.collections.impl.stack.primitive.AbstractBooleanStack.hashCode.

Implements org.eclipse.collections.api.stack.primitive.BooleanStack.hashCode.

Doc from org.eclipse.collections.api.stack.primitive.BooleanStack.hashCode.

Follows the same general contract as StackIterable#hashCode().

Annotations
@Override
newEmptyback to summary
public BooleanArrayStack newEmpty()

Overrides default org.eclipse.collections.api.stack.primitive.MutableBooleanStack.newEmpty.

Creates a new empty BooleanArrayStack.

Annotations
@Override
Since
9.2.
newStackback to summary
public static BooleanArrayStack newStack(BooleanIterable items)
newStackFromTopToBottomback to summary
public static BooleanArrayStack newStackFromTopToBottom(boolean... items)
newStackFromTopToBottomback to summary
public static BooleanArrayStack newStackFromTopToBottom(BooleanIterable items)
newStackWithback to summary
public static BooleanArrayStack newStackWith(boolean... items)
popback to summary
public boolean pop()

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.pop.

Doc from org.eclipse.collections.api.stack.primitive.MutableBooleanStack.pop.

Removes and returns the top element of the stack.

Annotations
@Override
popback to summary
public BooleanList pop(int count)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.pop.

Doc from org.eclipse.collections.api.stack.primitive.MutableBooleanStack.pop.

Removes and returns a BooleanList of the number of elements specified by the count, beginning with the top of the stack.

Annotations
@Override
pushback to summary
public void push(boolean item)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.push.

Doc from org.eclipse.collections.api.stack.primitive.MutableBooleanStack.push.

Adds an item to the top of the stack.

Annotations
@Override
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Annotations
@Override
Exceptions
IOException:
if I/O errors occur
rejectback to summary
public MutableBooleanStack reject(BooleanPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.reject, org.eclipse.collections.api.stack.primitive.BooleanStack.reject.

Doc from org.eclipse.collections.api.BooleanIterable.reject.

Returns a new BooleanIterable with all of the elements in the BooleanIterable that return false for the specified predicate.

Annotations
@Override
selectback to summary
public MutableBooleanStack select(BooleanPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableBooleanStack.select, org.eclipse.collections.api.stack.primitive.BooleanStack.select.

Doc from org.eclipse.collections.api.BooleanIterable.select.

Returns a new BooleanIterable with all of the elements in the BooleanIterable that return true for the specified predicate.

Annotations
@Override
toImmutableback to summary
public ImmutableBooleanStack toImmutable()

Implements org.eclipse.collections.api.stack.primitive.BooleanStack.toImmutable.

Annotations
@Override
toStackback to summary
public MutableBooleanStack toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable.toStack.

Doc from org.eclipse.collections.api.ordered.primitive.OrderedBooleanIterable.toStack.

Converts the collection to a BooleanStack.

Annotations
@Override
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Annotations
@Override
Exceptions
IOException:
Includes any I/O exceptions that may occur