Class SynchronizedDoubleStack
java.lang.Object
org.eclipse.collections.impl.stack.mutable.primitive.SynchronizedDoubleStack
- All Implemented Interfaces:
Serializable,DoubleIterable,OrderedDoubleIterable,PrimitiveIterable,DoubleStack,MutableDoubleStack
A synchronized view of a
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.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(DoublePredicate predicate) booleananySatisfy(DoublePredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()doubleaverage()chunk(int size) voidclear()<V> MutableStack<V>collect(DoubleToObjectFunction<? extends V> function) <V> MutableStack<V>collectWithIndex(DoubleIntToObjectFunction<? extends V> function) Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.<V,R extends Collection<V>>
RcollectWithIndex(DoubleIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.booleancontains(double value) booleancontainsAll(double... source) booleancontainsAll(DoubleIterable source) intcount(DoublePredicate predicate) doubledetectIfNone(DoublePredicate predicate, double ifNone) Must be called in a synchronized block.voideach(DoubleProcedure procedure) booleanvoidforEachWithIndex(DoubleIntProcedure procedure) doublegetFirst()inthashCode()intindexOf(double value) <T> TinjectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T, ? extends T> function) booleanisEmpty()makeString(String separator) makeString(String start, String separator, String end) doublemax()doublemaxIfEmpty(double defaultValue) doublemedian()doublemin()doubleminIfEmpty(double defaultValue) newEmpty()booleannoneSatisfy(DoublePredicate predicate) booleannotEmpty()doublepeek()peek(int count) doublepeekAt(int index) doublepop()pop(int count) voidpush(double item) reject(DoublePredicate predicate) rejectWithIndex(DoubleIntPredicate predicate) Returns a new MutableDoubleStack excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableDoubleCollection>
RrejectWithIndex(DoubleIntPredicate predicate, R target) Returns a new MutableDoubleCollection excluding all elements with corresponding indexes matching the specified predicate.select(DoublePredicate predicate) selectWithIndex(DoubleIntPredicate predicate) Returns a new MutableDoubleStack including all elements with corresponding indexes matching the specified predicate.<R extends MutableDoubleCollection>
RselectWithIndex(DoubleIntPredicate predicate, R target) Returns a new MutableDoubleCollection including all elements with corresponding indexes matching the specified predicate.intsize()doublesum()double[]toArray()double[]toArray(double[] target) toBag()toList()toSet()double[]toStack()toString()Methods inherited from interface org.eclipse.collections.api.DoubleIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.stack.primitive.MutableDoubleStack
tap
-
Constructor Details
-
SynchronizedDoubleStack
-
SynchronizedDoubleStack
-
-
Method Details
-
push
public void push(double item) - Specified by:
pushin interfaceMutableDoubleStack
-
pop
public double pop()- Specified by:
popin interfaceMutableDoubleStack
-
pop
- Specified by:
popin interfaceMutableDoubleStack
-
peek
public double peek()- Specified by:
peekin interfaceDoubleStack
-
peek
- Specified by:
peekin interfaceDoubleStack
-
peekAt
public double peekAt(int index) - Specified by:
peekAtin interfaceDoubleStack
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableDoubleStack
-
contains
public boolean contains(double value) - Specified by:
containsin interfaceDoubleIterable
-
containsAll
public boolean containsAll(double... source) - Specified by:
containsAllin interfaceDoubleIterable
-
containsAll
- Specified by:
containsAllin interfaceDoubleIterable
-
doubleIterator
Must be called in a synchronized block.- Specified by:
doubleIteratorin interfaceDoubleIterable
-
each
- Specified by:
eachin interfaceDoubleIterable- Since:
- 7.0.
-
count
- Specified by:
countin interfaceDoubleIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceDoubleIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceDoubleIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceDoubleIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceDoubleIterable
-
select
- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceDoubleStack- Specified by:
selectin interfaceMutableDoubleStack- Specified by:
selectin interfaceOrderedDoubleIterable
-
reject
- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceDoubleStack- Specified by:
rejectin interfaceMutableDoubleStack- Specified by:
rejectin interfaceOrderedDoubleIterable
-
collect
- Specified by:
collectin interfaceDoubleIterable- Specified by:
collectin interfaceDoubleStack- Specified by:
collectin interfaceMutableDoubleStack- Specified by:
collectin interfaceOrderedDoubleIterable
-
sum
public double sum()- Specified by:
sumin interfaceDoubleIterable
-
max
public double max()- Specified by:
maxin interfaceDoubleIterable
-
min
public double min()- Specified by:
minin interfaceDoubleIterable
-
minIfEmpty
public double minIfEmpty(double defaultValue) - Specified by:
minIfEmptyin interfaceDoubleIterable
-
maxIfEmpty
public double maxIfEmpty(double defaultValue) - Specified by:
maxIfEmptyin interfaceDoubleIterable
-
average
public double average()- Specified by:
averagein interfaceDoubleIterable
-
median
public double median()- Specified by:
medianin interfaceDoubleIterable
-
toSortedList
- Specified by:
toSortedListin interfaceDoubleIterable
-
toSortedArray
public double[] toSortedArray()- Specified by:
toSortedArrayin interfaceDoubleIterable
-
toArray
public double[] toArray()- Specified by:
toArrayin interfaceDoubleIterable
-
toArray
public double[] toArray(double[] target) - Specified by:
toArrayin interfaceDoubleIterable
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
- Specified by:
toListin interfaceDoubleIterable
-
toSet
- Specified by:
toSetin interfaceDoubleIterable
-
toBag
- Specified by:
toBagin interfaceDoubleIterable
-
equals
- Specified by:
equalsin interfaceDoubleStack- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceDoubleStack- Overrides:
hashCodein classObject
-
asLazy
- Specified by:
asLazyin interfaceDoubleIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableDoubleStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableDoubleStack
-
toImmutable
- Specified by:
toImmutablein interfaceDoubleStack
-
newEmpty
- Specified by:
newEmptyin interfaceMutableDoubleStack- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceDoubleIterable
-
chunk
- Specified by:
chunkin interfaceDoubleIterable
-
getFirst
public double getFirst()- Specified by:
getFirstin interfaceOrderedDoubleIterable
-
indexOf
public int indexOf(double value) - Specified by:
indexOfin interfaceOrderedDoubleIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedDoubleIterable
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedDoubleIterable
-
selectWithIndex
Returns a new MutableDoubleStack including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceDoubleStack- Specified by:
selectWithIndexin interfaceMutableDoubleStack- Specified by:
selectWithIndexin interfaceOrderedDoubleIterable- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableDoubleCollection> R selectWithIndex(DoubleIntPredicate predicate, R target) Returns a new MutableDoubleCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedDoubleIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableDoubleStack excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceDoubleStack- Specified by:
rejectWithIndexin interfaceMutableDoubleStack- Specified by:
rejectWithIndexin interfaceOrderedDoubleIterable- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableDoubleCollection> R rejectWithIndex(DoubleIntPredicate predicate, R target) Returns a new MutableDoubleCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedDoubleIterable- Since:
- 11.1.
-
collectWithIndex
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceDoubleStack- Specified by:
collectWithIndexin interfaceMutableDoubleStack- Specified by:
collectWithIndexin interfaceOrderedDoubleIterable- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(DoubleIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedDoubleIterable- Since:
- 9.1.
-
toStack
- Specified by:
toStackin interfaceOrderedDoubleIterable
-