@ThreadSafe public final class SynchronizedByteStack extends Object implements MutableByteStack, Serializable
MutableByteStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
ByteIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
MutableByteStack.asSynchronized(),
MutableStack.asSynchronized(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(BytePredicate predicate) |
boolean |
anySatisfy(BytePredicate predicate) |
void |
appendString(Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyByteIterable |
asLazy() |
MutableByteStack |
asSynchronized() |
MutableByteStack |
asUnmodifiable() |
double |
average() |
ByteIterator |
byteIterator()
Must be called in a synchronized block.
|
void |
clear()
Clears the Stack
|
<V> MutableStack<V> |
collect(ByteToObjectFunction<? extends V> function) |
boolean |
contains(byte value) |
boolean |
containsAll(byte... source) |
boolean |
containsAll(ByteIterable source) |
int |
count(BytePredicate predicate) |
byte |
detectIfNone(BytePredicate predicate,
byte ifNone) |
void |
each(ByteProcedure procedure) |
boolean |
equals(Object otherStack)
Follows the same general contract as
StackIterable.equals(Object). |
void |
forEach(ByteProcedure procedure) |
int |
hashCode()
Follows the same general contract as
StackIterable.hashCode(). |
<T> T |
injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
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). |
String |
makeString(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). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
byte |
max() |
byte |
maxIfEmpty(byte defaultValue) |
double |
median() |
byte |
min() |
byte |
minIfEmpty(byte defaultValue) |
boolean |
noneSatisfy(BytePredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
byte |
peek()
Returns the top of the stack.
|
ByteList |
peek(int count)
Returns ByteList of the number of elements specified by the count, beginning with the top of the stack.
|
byte |
peekAt(int index)
Returns the element at the specified index.
|
byte |
pop()
Removes and returns the top element of the stack.
|
ByteList |
pop(int count)
Removes and returns a ByteList of the number of elements specified by the count, beginning with the top of the stack.
|
void |
push(byte item)
Adds an item to the top of the stack.
|
MutableByteStack |
reject(BytePredicate predicate) |
MutableByteStack |
select(BytePredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
byte[] |
toArray() |
MutableByteBag |
toBag() |
ImmutableByteStack |
toImmutable() |
MutableByteList |
toList() |
MutableByteSet |
toSet() |
byte[] |
toSortedArray() |
MutableByteList |
toSortedList() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
public void push(byte item)
MutableByteStackpush in interface MutableByteStackpublic byte pop()
MutableByteStackpop in interface MutableByteStackpublic ByteList pop(int count)
MutableByteStackpop in interface MutableByteStackpublic byte peek()
ByteStackpublic ByteList peek(int count)
ByteStackpublic byte peekAt(int index)
ByteStackpublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic void clear()
MutableByteStackclear in interface MutableByteStackpublic boolean contains(byte value)
contains in interface ByteIterablepublic boolean containsAll(byte... source)
containsAll in interface ByteIterablepublic boolean containsAll(ByteIterable source)
containsAll in interface ByteIterablepublic ByteIterator byteIterator()
byteIterator in interface ByteIterablepublic void forEach(ByteProcedure procedure)
forEach in interface ByteIterablepublic void each(ByteProcedure procedure)
each in interface ByteIterablepublic int count(BytePredicate predicate)
count in interface ByteIterablepublic boolean anySatisfy(BytePredicate predicate)
anySatisfy in interface ByteIterablepublic boolean allSatisfy(BytePredicate predicate)
allSatisfy in interface ByteIterablepublic boolean noneSatisfy(BytePredicate predicate)
noneSatisfy in interface ByteIterablepublic byte detectIfNone(BytePredicate predicate, byte ifNone)
detectIfNone in interface ByteIterablepublic MutableByteStack select(BytePredicate predicate)
select in interface ByteIterableselect in interface ByteStackselect in interface MutableByteStackpublic MutableByteStack reject(BytePredicate predicate)
reject in interface ByteIterablereject in interface ByteStackreject in interface MutableByteStackpublic <V> MutableStack<V> collect(ByteToObjectFunction<? extends V> function)
collect in interface ByteIterablecollect in interface ByteStackcollect in interface MutableByteStackpublic long sum()
sum in interface ByteIterablepublic byte max()
max in interface ByteIterablepublic byte min()
min in interface ByteIterablepublic byte minIfEmpty(byte defaultValue)
minIfEmpty in interface ByteIterablepublic byte maxIfEmpty(byte defaultValue)
maxIfEmpty in interface ByteIterablepublic double average()
average in interface ByteIterablepublic double median()
median in interface ByteIterablepublic MutableByteList toSortedList()
toSortedList in interface ByteIterablepublic byte[] toSortedArray()
toSortedArray in interface ByteIterablepublic byte[] toArray()
toArray in interface ByteIterablepublic String toString()
PrimitiveIterabletoString in interface PrimitiveIterabletoString in class Objectpublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic MutableByteList toList()
toList in interface ByteIterablepublic MutableByteSet toSet()
toSet in interface ByteIterablepublic MutableByteBag toBag()
toBag in interface ByteIterablepublic boolean equals(Object otherStack)
ByteStackStackIterable.equals(Object).public int hashCode()
ByteStackStackIterable.hashCode().public LazyByteIterable asLazy()
asLazy in interface ByteIterablepublic MutableByteStack asUnmodifiable()
asUnmodifiable in interface MutableByteStackpublic MutableByteStack asSynchronized()
asSynchronized in interface MutableByteStackpublic ImmutableByteStack toImmutable()
toImmutable in interface ByteStackpublic <T> T injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function)
injectInto in interface ByteIterableCopyright © 2004–2016. All rights reserved.