@ThreadSafe public final class SynchronizedDoubleStack extends Object implements MutableDoubleStack, Serializable
MutableDoubleStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
DoubleIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
MutableDoubleStack.asSynchronized(),
MutableStack.asSynchronized(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(DoublePredicate predicate) |
boolean |
anySatisfy(DoublePredicate 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. |
LazyDoubleIterable |
asLazy() |
MutableDoubleStack |
asSynchronized() |
MutableDoubleStack |
asUnmodifiable() |
double |
average() |
void |
clear()
Clears the Stack
|
<V> MutableStack<V> |
collect(DoubleToObjectFunction<? extends V> function) |
boolean |
contains(double value) |
boolean |
containsAll(double... source) |
boolean |
containsAll(DoubleIterable source) |
int |
count(DoublePredicate predicate) |
double |
detectIfNone(DoublePredicate predicate,
double ifNone) |
DoubleIterator |
doubleIterator()
Must be called in a synchronized block.
|
void |
each(DoubleProcedure procedure) |
boolean |
equals(Object otherStack)
Follows the same general contract as
StackIterable.equals(Object). |
void |
forEach(DoubleProcedure procedure) |
void |
forEachWithIndex(DoubleIntProcedure procedure) |
double |
getFirst() |
int |
hashCode()
Follows the same general contract as
StackIterable.hashCode(). |
int |
indexOf(double value) |
<T> T |
injectInto(T injectedValue,
ObjectDoubleToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
ObjectDoubleIntToObjectFunction<? 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.
|
double |
max() |
double |
maxIfEmpty(double defaultValue) |
double |
median() |
double |
min() |
double |
minIfEmpty(double defaultValue) |
boolean |
noneSatisfy(DoublePredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
double |
peek()
Returns the top of the stack.
|
DoubleList |
peek(int count)
Returns DoubleList of the number of elements specified by the count, beginning with the top of the stack.
|
double |
peekAt(int index)
Returns the element at the specified index.
|
double |
pop()
Removes and returns the top element of the stack.
|
DoubleList |
pop(int count)
Removes and returns a DoubleList of the number of elements specified by the count, beginning with the top of the stack.
|
void |
push(double item)
Adds an item to the top of the stack.
|
MutableDoubleStack |
reject(DoublePredicate predicate) |
MutableDoubleStack |
select(DoublePredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
double |
sum() |
double[] |
toArray() |
MutableDoubleBag |
toBag() |
ImmutableDoubleStack |
toImmutable() |
MutableDoubleList |
toList() |
MutableDoubleSet |
toSet() |
double[] |
toSortedArray() |
MutableDoubleList |
toSortedList() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
summaryStatisticspublic void push(double item)
MutableDoubleStackpush in interface MutableDoubleStackpublic double pop()
MutableDoubleStackpop in interface MutableDoubleStackpublic DoubleList pop(int count)
MutableDoubleStackpop in interface MutableDoubleStackpublic double peek()
DoubleStackpeek in interface DoubleStackpublic DoubleList peek(int count)
DoubleStackpeek in interface DoubleStackpublic double peekAt(int index)
DoubleStackpeekAt in interface DoubleStackindex - the location to peek intopublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic void clear()
MutableDoubleStackclear in interface MutableDoubleStackpublic boolean contains(double value)
contains in interface DoubleIterablepublic boolean containsAll(double... source)
containsAll in interface DoubleIterablepublic boolean containsAll(DoubleIterable source)
containsAll in interface DoubleIterablepublic DoubleIterator doubleIterator()
doubleIterator in interface DoubleIterablepublic void forEach(DoubleProcedure procedure)
forEach in interface DoubleIterablepublic void each(DoubleProcedure procedure)
each in interface DoubleIterablepublic int count(DoublePredicate predicate)
count in interface DoubleIterablepublic boolean anySatisfy(DoublePredicate predicate)
anySatisfy in interface DoubleIterablepublic boolean allSatisfy(DoublePredicate predicate)
allSatisfy in interface DoubleIterablepublic boolean noneSatisfy(DoublePredicate predicate)
noneSatisfy in interface DoubleIterablepublic double detectIfNone(DoublePredicate predicate, double ifNone)
detectIfNone in interface DoubleIterablepublic MutableDoubleStack select(DoublePredicate predicate)
select in interface DoubleIterableselect in interface OrderedDoubleIterableselect in interface DoubleStackselect in interface MutableDoubleStackpublic MutableDoubleStack reject(DoublePredicate predicate)
reject in interface DoubleIterablereject in interface OrderedDoubleIterablereject in interface DoubleStackreject in interface MutableDoubleStackpublic <V> MutableStack<V> collect(DoubleToObjectFunction<? extends V> function)
collect in interface DoubleIterablecollect in interface OrderedDoubleIterablecollect in interface DoubleStackcollect in interface MutableDoubleStackpublic double sum()
sum in interface DoubleIterablepublic double max()
max in interface DoubleIterablepublic double min()
min in interface DoubleIterablepublic double minIfEmpty(double defaultValue)
minIfEmpty in interface DoubleIterablepublic double maxIfEmpty(double defaultValue)
maxIfEmpty in interface DoubleIterablepublic double average()
average in interface DoubleIterablepublic double median()
median in interface DoubleIterablepublic MutableDoubleList toSortedList()
toSortedList in interface DoubleIterablepublic double[] toSortedArray()
toSortedArray in interface DoubleIterablepublic double[] toArray()
toArray in interface DoubleIterablepublic 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 MutableDoubleList toList()
toList in interface DoubleIterablepublic MutableDoubleSet toSet()
toSet in interface DoubleIterablepublic MutableDoubleBag toBag()
toBag in interface DoubleIterablepublic boolean equals(Object otherStack)
DoubleStackStackIterable.equals(Object).equals in interface DoubleStackequals in class Objectpublic int hashCode()
DoubleStackStackIterable.hashCode().hashCode in interface DoubleStackhashCode in class Objectpublic LazyDoubleIterable asLazy()
asLazy in interface DoubleIterablepublic MutableDoubleStack asUnmodifiable()
asUnmodifiable in interface MutableDoubleStackpublic MutableDoubleStack asSynchronized()
asSynchronized in interface MutableDoubleStackpublic ImmutableDoubleStack toImmutable()
toImmutable in interface DoubleStackpublic <T> T injectInto(T injectedValue,
ObjectDoubleToObjectFunction<? super T,? extends T> function)
injectInto in interface DoubleIterablepublic double getFirst()
getFirst in interface OrderedDoubleIterablepublic int indexOf(double value)
indexOf in interface OrderedDoubleIterablepublic <T> T injectIntoWithIndex(T injectedValue,
ObjectDoubleIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface OrderedDoubleIterablepublic void forEachWithIndex(DoubleIntProcedure procedure)
forEachWithIndex in interface OrderedDoubleIterableCopyright © 2004–2016. All rights reserved.