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

public Class CharArrayStack

extends AbstractCharStack
implements MutableCharStack, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.stack.primitive.MutableCharStack, org.eclipse.collections.api.stack.primitive.CharStack, org.eclipse.collections.api.ordered.primitive.OrderedCharIterable, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.PrimitiveIterable
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.block.function.primitive.CharToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.CharPredicate, org.eclipse.collections.api.iterator.CharIterator, org.eclipse.collections.api.list.primitive.CharList, .MutableCharList, org.eclipse.collections.api.stack.MutableStack, org.eclipse.collections.api.stack.primitive.CharStack, .ImmutableCharStack, .MutableCharStack, org.eclipse.collections.impl.factory.primitive.CharStacks, org.eclipse.collections.impl.list.mutable.primitive.CharArrayList, org.eclipse.collections.impl.stack.primitive.AbstractCharStack, org.eclipse.collections.impl.stack.mutable.ArrayStack

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

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
private
CharArrayStack(int size)

private
CharArrayStack(char... items)

Method Summary

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

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.collect, org.eclipse.collections.api.stack.primitive.CharStack.collect.

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

public boolean
protected CharArrayList
public int
public CharArrayStack
newEmpty()

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

Creates a new empty CharArrayStack.

public static CharArrayStack
public static CharArrayStack
newStackFromTopToBottom(char... items)

public static CharArrayStack
public static CharArrayStack
newStackWith(char... items)

public char
pop()

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

Removes and returns the top element of the stack.

public CharList
pop(int count)

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

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

public void
push(char item)

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.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 MutableCharStack
reject(CharPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.reject, org.eclipse.collections.api.stack.primitive.CharStack.reject.

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

public MutableCharStack
select(CharPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.select, org.eclipse.collections.api.stack.primitive.CharStack.select.

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

public ImmutableCharStack
public MutableCharList
public MutableCharStack
toStack()

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

Converts the collection to a CharStack.

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.AbstractCharStack:
allSatisfyanySatisfyappendStringappendStringappendStringasLazyaveragecharIteratorcheckEmptyStackcheckPositiveValueForCountcheckSizeLessThanCountchunkcontainscontainsAllcontainsAllcountdetectIfNoneeachforEachWithIndexgetFirstindexOfinjectIntoinjectIntoWithIndexmakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfypeekpeekpeekAtrangeChecksizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoString

Field Detail

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

Constructor Detail

CharArrayStackback to summary
public CharArrayStack()
CharArrayStackback to summary
private CharArrayStack(int size)
CharArrayStackback to summary
private CharArrayStack(char... items)

Method Detail

asSynchronizedback to summary
public MutableCharStack asSynchronized()

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

Annotations
@Override
asUnmodifiableback to summary
public MutableCharStack asUnmodifiable()

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

Annotations
@Override
clearback to summary
public void clear()

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

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

Clears the Stack

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

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.collect, org.eclipse.collections.api.stack.primitive.CharStack.collect.

Doc from org.eclipse.collections.api.CharIterable.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.AbstractCharStack.equals.

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

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

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

Annotations
@Override
getDelegateback to summary
protected CharArrayList getDelegate()

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

Annotations
@Override
hashCodeback to summary
public int hashCode()

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

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

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

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

Annotations
@Override
newEmptyback to summary
public CharArrayStack newEmpty()

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

Creates a new empty CharArrayStack.

Annotations
@Override
Since
9.2.
newStackback to summary
public static CharArrayStack newStack(CharIterable items)
newStackFromTopToBottomback to summary
public static CharArrayStack newStackFromTopToBottom(char... items)
newStackFromTopToBottomback to summary
public static CharArrayStack newStackFromTopToBottom(CharIterable items)
newStackWithback to summary
public static CharArrayStack newStackWith(char... items)
popback to summary
public char pop()

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

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

Removes and returns the top element of the stack.

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

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

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

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

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

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

Doc from org.eclipse.collections.api.stack.primitive.MutableCharStack.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 MutableCharStack reject(CharPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.reject, org.eclipse.collections.api.stack.primitive.CharStack.reject.

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

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

Annotations
@Override
selectback to summary
public MutableCharStack select(CharPredicate predicate)

Implements org.eclipse.collections.api.stack.primitive.MutableCharStack.select, org.eclipse.collections.api.stack.primitive.CharStack.select.

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

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

Annotations
@Override
toImmutableback to summary
public ImmutableCharStack toImmutable()

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

Annotations
@Override
toSortedListback to summary
public MutableCharList toSortedList()

Implements org.eclipse.collections.api.CharIterable.toSortedList.

Annotations
@Override
toStackback to summary
public MutableCharStack toStack()

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

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

Converts the collection to a CharStack.

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