@NotThreadSafe
public final class CharArrayStack
extends java.lang.Object
implements com.gs.collections.api.stack.primitive.MutableCharStack, java.io.Externalizable
ArrayStack, and is memory-optimized for char primitives.
This file was automatically generated from template file primitiveArrayStack.stg.| Constructor and Description |
|---|
CharArrayStack() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
boolean |
anySatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
void |
appendString(java.lang.Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(java.lang.Appendable appendable,
java.lang.String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
Prints a string representation of this collection onto the given
Appendable. |
com.gs.collections.api.LazyCharIterable |
asLazy() |
com.gs.collections.api.stack.primitive.MutableCharStack |
asSynchronized() |
com.gs.collections.api.stack.primitive.MutableCharStack |
asUnmodifiable() |
double |
average() |
com.gs.collections.api.iterator.CharIterator |
charIterator() |
void |
clear()
Clears the Stack
|
<V> com.gs.collections.api.stack.MutableStack<V> |
collect(com.gs.collections.api.block.function.primitive.CharToObjectFunction<? extends V> function) |
boolean |
contains(char value) |
boolean |
containsAll(char... source) |
boolean |
containsAll(com.gs.collections.api.CharIterable source) |
int |
count(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
char |
detectIfNone(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate,
char ifNone) |
boolean |
equals(java.lang.Object otherStack)
Follows the same general contract as
StackIterable.equals(Object). |
void |
forEach(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure) |
int |
hashCode()
Follows the same general contract as
StackIterable.hashCode(). |
<V> V |
injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectCharToObjectFunction<? super V,? extends V> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
java.lang.String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
java.lang.String |
makeString(java.lang.String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
java.lang.String |
makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
Returns a string representation of this collection.
|
char |
max() |
char |
maxIfEmpty(char defaultValue) |
double |
median() |
char |
min() |
char |
minIfEmpty(char defaultValue) |
static CharArrayStack |
newStack(com.gs.collections.api.CharIterable items) |
static CharArrayStack |
newStackFromTopToBottom(char... items) |
static CharArrayStack |
newStackFromTopToBottom(com.gs.collections.api.CharIterable items) |
static CharArrayStack |
newStackWith(char... items) |
boolean |
noneSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
char |
peek()
Returns the top of the stack.
|
com.gs.collections.api.list.primitive.CharList |
peek(int count)
Returns CharList of the number of elements specified by the count, beginning with the top of the stack.
|
char |
peekAt(int index)
Returns the element at the specified index.
|
char |
pop()
Removes and returns the top element of the stack.
|
com.gs.collections.api.list.primitive.CharList |
pop(int count)
Removes and returns a CharList of the number of elements specified by the count, beginning with the top of the stack.
|
void |
push(char item)
Adds an item to the top of the stack.
|
void |
readExternal(java.io.ObjectInput in) |
com.gs.collections.api.stack.primitive.MutableCharStack |
reject(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
com.gs.collections.api.stack.primitive.MutableCharStack |
select(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
char[] |
toArray() |
com.gs.collections.api.bag.primitive.MutableCharBag |
toBag() |
com.gs.collections.api.stack.primitive.ImmutableCharStack |
toImmutable() |
com.gs.collections.api.list.primitive.MutableCharList |
toList() |
com.gs.collections.api.set.primitive.MutableCharSet |
toSet() |
char[] |
toSortedArray() |
com.gs.collections.api.list.primitive.MutableCharList |
toSortedList() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
void |
writeExternal(java.io.ObjectOutput out) |
public static CharArrayStack newStackFromTopToBottom(char... items)
public static CharArrayStack newStackWith(char... items)
public static CharArrayStack newStack(com.gs.collections.api.CharIterable items)
public static CharArrayStack newStackFromTopToBottom(com.gs.collections.api.CharIterable items)
public void push(char item)
com.gs.collections.api.stack.primitive.MutableCharStackpush in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic char pop()
com.gs.collections.api.stack.primitive.MutableCharStackpop in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic com.gs.collections.api.list.primitive.CharList pop(int count)
com.gs.collections.api.stack.primitive.MutableCharStackpop in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic com.gs.collections.api.stack.primitive.MutableCharStack select(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
select in interface com.gs.collections.api.CharIterableselect in interface com.gs.collections.api.stack.primitive.CharStackselect in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic com.gs.collections.api.stack.primitive.MutableCharStack reject(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
reject in interface com.gs.collections.api.CharIterablereject in interface com.gs.collections.api.stack.primitive.CharStackreject in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic char peek()
com.gs.collections.api.stack.primitive.CharStackpeek in interface com.gs.collections.api.stack.primitive.CharStackpublic com.gs.collections.api.list.primitive.CharList peek(int count)
com.gs.collections.api.stack.primitive.CharStackpeek in interface com.gs.collections.api.stack.primitive.CharStackpublic char peekAt(int index)
com.gs.collections.api.stack.primitive.CharStackpeekAt in interface com.gs.collections.api.stack.primitive.CharStackindex - the location to peek intopublic com.gs.collections.api.iterator.CharIterator charIterator()
charIterator in interface com.gs.collections.api.CharIterablepublic void forEach(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure)
forEach in interface com.gs.collections.api.CharIterablepublic int size()
com.gs.collections.api.PrimitiveIterablesize in interface com.gs.collections.api.PrimitiveIterablepublic boolean isEmpty()
com.gs.collections.api.PrimitiveIterableisEmpty in interface com.gs.collections.api.PrimitiveIterablepublic boolean notEmpty()
com.gs.collections.api.PrimitiveIterablenotEmpty in interface com.gs.collections.api.PrimitiveIterablepublic int count(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
count in interface com.gs.collections.api.CharIterablepublic boolean anySatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
anySatisfy in interface com.gs.collections.api.CharIterablepublic boolean allSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
allSatisfy in interface com.gs.collections.api.CharIterablepublic boolean noneSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
noneSatisfy in interface com.gs.collections.api.CharIterablepublic char detectIfNone(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate,
char ifNone)
detectIfNone in interface com.gs.collections.api.CharIterablepublic <V> com.gs.collections.api.stack.MutableStack<V> collect(com.gs.collections.api.block.function.primitive.CharToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.CharIterablecollect in interface com.gs.collections.api.stack.primitive.CharStackcollect in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic <V> V injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectCharToObjectFunction<? super V,? extends V> function)
injectInto in interface com.gs.collections.api.CharIterablepublic long sum()
sum in interface com.gs.collections.api.CharIterablepublic char max()
max in interface com.gs.collections.api.CharIterablepublic char min()
min in interface com.gs.collections.api.CharIterablepublic char minIfEmpty(char defaultValue)
minIfEmpty in interface com.gs.collections.api.CharIterablepublic char maxIfEmpty(char defaultValue)
maxIfEmpty in interface com.gs.collections.api.CharIterablepublic double average()
average in interface com.gs.collections.api.CharIterablepublic double median()
median in interface com.gs.collections.api.CharIterablepublic char[] toSortedArray()
toSortedArray in interface com.gs.collections.api.CharIterablepublic char[] toArray()
toArray in interface com.gs.collections.api.CharIterablepublic boolean contains(char value)
contains in interface com.gs.collections.api.CharIterablepublic boolean containsAll(char... source)
containsAll in interface com.gs.collections.api.CharIterablepublic boolean containsAll(com.gs.collections.api.CharIterable source)
containsAll in interface com.gs.collections.api.CharIterablepublic void clear()
com.gs.collections.api.stack.primitive.MutableCharStackclear in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic boolean equals(java.lang.Object otherStack)
com.gs.collections.api.stack.primitive.CharStackStackIterable.equals(Object).equals in interface com.gs.collections.api.stack.primitive.CharStackequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.stack.primitive.CharStackStackIterable.hashCode().hashCode in interface com.gs.collections.api.stack.primitive.CharStackhashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.PrimitiveIterabletoString in class java.lang.Objectpublic java.lang.String makeString()
com.gs.collections.api.PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString(java.lang.String separator)
com.gs.collections.api.PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterablemakeString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String separator)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic com.gs.collections.api.list.primitive.MutableCharList toList()
toList in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.list.primitive.MutableCharList toSortedList()
toSortedList in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.set.primitive.MutableCharSet toSet()
toSet in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.bag.primitive.MutableCharBag toBag()
toBag in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.LazyCharIterable asLazy()
asLazy in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.stack.primitive.MutableCharStack asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic com.gs.collections.api.stack.primitive.MutableCharStack asSynchronized()
asSynchronized in interface com.gs.collections.api.stack.primitive.MutableCharStackpublic com.gs.collections.api.stack.primitive.ImmutableCharStack toImmutable()
toImmutable in interface com.gs.collections.api.stack.primitive.CharStackpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOException