Class SynchronizedDoubleList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedDoubleCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.SynchronizedDoubleList
-
- All Implemented Interfaces:
Serializable,MutableDoubleCollection,DoubleIterable,DoubleList,MutableDoubleList,OrderedDoubleIterable,ReversibleDoubleIterable,PrimitiveIterable
public class SynchronizedDoubleList extends AbstractSynchronizedDoubleCollection implements MutableDoubleList
A synchronized view of aMutableDoubleList. It is imperative that the user manually synchronize on the on the collection when iterating over it using an iterator or stream.This file was automatically generated from template file synchronizedPrimitiveList.stg.
- Since:
- 3.1.
- See Also:
MutableDoubleList.asSynchronized(),MutableList.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedDoubleList(MutableDoubleList list)SynchronizedDoubleList(MutableDoubleList list, Object newLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAllAtIndex(int index, double... source)booleanaddAllAtIndex(int index, DoubleIterable source)voidaddAtIndex(int index, double element)LazyDoubleIterableasLazy()LazyDoubleIterableasReversed()MutableDoubleListasSynchronized()MutableDoubleListasUnmodifiable()intbinarySearch(double value)MutableList<Double>boxed()<V> MutableList<V>collect(DoubleToObjectFunction<? extends V> function)<V> MutableList<V>collectWithIndex(DoubleIntToObjectFunction<? extends V> function)Returns a new MutableList 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.MutableDoubleListdistinct()doubledotProduct(DoubleList list)booleanequals(Object otherList)voidforEachInBoth(DoubleList other, DoubleDoubleProcedure procedure)voidforEachWithIndex(DoubleIntProcedure procedure)doubleget(int index)doublegetFirst()doublegetLast()inthashCode()intindexOf(double value)<T> TinjectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T,? extends T> function)intlastIndexOf(double value)MutableDoubleListnewEmpty()MutableDoubleListreject(DoublePredicate predicate)MutableDoubleListrejectWithIndex(DoubleIntPredicate predicate)Returns a new MutableDoubleList 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.doubleremoveAtIndex(int index)MutableDoubleListreverseThis()MutableDoubleListselect(DoublePredicate predicate)MutableDoubleListselectWithIndex(DoubleIntPredicate predicate)Returns a new MutableDoubleList 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.doubleset(int index, double element)MutableDoubleListshuffleThis()MutableDoubleListshuffleThis(Random rnd)MutableDoubleListsortThis()MutableDoubleListsortThis(DoubleComparator comparator)<T> MutableDoubleListsortThisBy(DoubleToObjectFunction<T> function)<T> MutableDoubleListsortThisBy(DoubleToObjectFunction<T> function, Comparator<? super T> comparator)Spliterator.OfDoublespliterator()This function needs to be synchronized manuallyMutableDoubleListsubList(int fromIndex, int toIndex)ImmutableDoubleListtoImmutable()MutableDoubleListtoReversed()SynchronizedDoubleListwith(double element)SynchronizedDoubleListwithAll(DoubleIterable elements)SynchronizedDoubleListwithout(double element)SynchronizedDoubleListwithoutAll(DoubleIterable elements)<T> MutableList<DoubleObjectPair<T>>zip(Iterable<T> iterable)MutableList<DoubleDoublePair>zipDouble(DoubleIterable iterable)-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedDoubleCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, doubleIterator, each, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
allSatisfy, anySatisfy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.DoubleList
primitiveParallelStream, primitiveStream
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
add, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableDoubleList
swap, tap
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
SynchronizedDoubleList
public SynchronizedDoubleList(MutableDoubleList list)
-
SynchronizedDoubleList
public SynchronizedDoubleList(MutableDoubleList list, Object newLock)
-
-
Method Detail
-
get
public double get(int index)
- Specified by:
getin interfaceDoubleList
-
getFirst
public double getFirst()
- Specified by:
getFirstin interfaceOrderedDoubleIterable
-
getLast
public double getLast()
- Specified by:
getLastin interfaceReversibleDoubleIterable
-
indexOf
public int indexOf(double value)
- Specified by:
indexOfin interfaceOrderedDoubleIterable
-
lastIndexOf
public int lastIndexOf(double value)
- Specified by:
lastIndexOfin interfaceDoubleList
-
addAtIndex
public void addAtIndex(int index, double element)- Specified by:
addAtIndexin interfaceMutableDoubleList
-
addAllAtIndex
public boolean addAllAtIndex(int index, double... source)- Specified by:
addAllAtIndexin interfaceMutableDoubleList
-
addAllAtIndex
public boolean addAllAtIndex(int index, DoubleIterable source)- Specified by:
addAllAtIndexin interfaceMutableDoubleList
-
removeAtIndex
public double removeAtIndex(int index)
- Specified by:
removeAtIndexin interfaceMutableDoubleList
-
set
public double set(int index, double element)- Specified by:
setin interfaceMutableDoubleList
-
with
public SynchronizedDoubleList with(double element)
- Specified by:
within interfaceMutableDoubleCollection- Specified by:
within interfaceMutableDoubleList- Overrides:
within classAbstractSynchronizedDoubleCollection
-
without
public SynchronizedDoubleList without(double element)
- Specified by:
withoutin interfaceMutableDoubleCollection- Specified by:
withoutin interfaceMutableDoubleList- Overrides:
withoutin classAbstractSynchronizedDoubleCollection
-
withAll
public SynchronizedDoubleList withAll(DoubleIterable elements)
- Specified by:
withAllin interfaceMutableDoubleCollection- Specified by:
withAllin interfaceMutableDoubleList- Overrides:
withAllin classAbstractSynchronizedDoubleCollection
-
withoutAll
public SynchronizedDoubleList withoutAll(DoubleIterable elements)
- Specified by:
withoutAllin interfaceMutableDoubleCollection- Specified by:
withoutAllin interfaceMutableDoubleList- Overrides:
withoutAllin classAbstractSynchronizedDoubleCollection
-
select
public MutableDoubleList select(DoublePredicate predicate)
- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceDoubleList- Specified by:
selectin interfaceMutableDoubleCollection- Specified by:
selectin interfaceMutableDoubleList- Specified by:
selectin interfaceOrderedDoubleIterable- Specified by:
selectin interfaceReversibleDoubleIterable- Overrides:
selectin classAbstractSynchronizedDoubleCollection
-
boxed
public MutableList<Double> boxed()
- Specified by:
boxedin interfaceMutableDoubleList
-
reject
public MutableDoubleList reject(DoublePredicate predicate)
- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceDoubleList- Specified by:
rejectin interfaceMutableDoubleCollection- Specified by:
rejectin interfaceMutableDoubleList- Specified by:
rejectin interfaceOrderedDoubleIterable- Specified by:
rejectin interfaceReversibleDoubleIterable- Overrides:
rejectin classAbstractSynchronizedDoubleCollection
-
collect
public <V> MutableList<V> collect(DoubleToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceDoubleIterable- Specified by:
collectin interfaceDoubleList- Specified by:
collectin interfaceMutableDoubleCollection- Specified by:
collectin interfaceMutableDoubleList- Specified by:
collectin interfaceOrderedDoubleIterable- Specified by:
collectin interfaceReversibleDoubleIterable- Overrides:
collectin classAbstractSynchronizedDoubleCollection
-
sortThis
public MutableDoubleList sortThis()
- Specified by:
sortThisin interfaceMutableDoubleList
-
sortThis
public MutableDoubleList sortThis(DoubleComparator comparator)
- Specified by:
sortThisin interfaceMutableDoubleList
-
sortThisBy
public <T> MutableDoubleList sortThisBy(DoubleToObjectFunction<T> function)
- Specified by:
sortThisByin interfaceMutableDoubleList
-
sortThisBy
public <T> MutableDoubleList sortThisBy(DoubleToObjectFunction<T> function, Comparator<? super T> comparator)
- Specified by:
sortThisByin interfaceMutableDoubleList
-
shuffleThis
public MutableDoubleList shuffleThis()
- Specified by:
shuffleThisin interfaceMutableDoubleList
-
shuffleThis
public MutableDoubleList shuffleThis(Random rnd)
- Specified by:
shuffleThisin interfaceMutableDoubleList
-
binarySearch
public int binarySearch(double value)
- Specified by:
binarySearchin interfaceDoubleList
-
dotProduct
public double dotProduct(DoubleList list)
- Specified by:
dotProductin interfaceDoubleList
-
equals
public boolean equals(Object otherList)
- Specified by:
equalsin interfaceDoubleList- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceDoubleList- Overrides:
hashCodein classObject
-
asLazy
public LazyDoubleIterable asLazy()
- Specified by:
asLazyin interfaceDoubleIterable- Overrides:
asLazyin classAbstractSynchronizedDoubleCollection
-
asUnmodifiable
public MutableDoubleList asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableDoubleCollection- Specified by:
asUnmodifiablein interfaceMutableDoubleList- Overrides:
asUnmodifiablein classAbstractSynchronizedDoubleCollection
-
asSynchronized
public MutableDoubleList asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableDoubleCollection- Specified by:
asSynchronizedin interfaceMutableDoubleList- Overrides:
asSynchronizedin classAbstractSynchronizedDoubleCollection
-
toImmutable
public ImmutableDoubleList toImmutable()
- Specified by:
toImmutablein interfaceDoubleList- Specified by:
toImmutablein interfaceMutableDoubleCollection- Specified by:
toImmutablein interfaceMutableDoubleList- Overrides:
toImmutablein classAbstractSynchronizedDoubleCollection
-
newEmpty
public MutableDoubleList newEmpty()
- Specified by:
newEmptyin interfaceMutableDoubleCollection- Specified by:
newEmptyin interfaceMutableDoubleList- Since:
- 9.2.
-
reverseThis
public MutableDoubleList reverseThis()
- Specified by:
reverseThisin interfaceMutableDoubleList
-
toReversed
public MutableDoubleList toReversed()
- Specified by:
toReversedin interfaceDoubleList- Specified by:
toReversedin interfaceMutableDoubleList- Specified by:
toReversedin interfaceReversibleDoubleIterable
-
asReversed
public LazyDoubleIterable asReversed()
- Specified by:
asReversedin interfaceReversibleDoubleIterable
-
forEachInBoth
public void forEachInBoth(DoubleList other, DoubleDoubleProcedure procedure)
- Specified by:
forEachInBothin interfaceDoubleList
-
forEachWithIndex
public void forEachWithIndex(DoubleIntProcedure procedure)
- Specified by:
forEachWithIndexin interfaceOrderedDoubleIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectDoubleIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoWithIndexin interfaceOrderedDoubleIterable- Specified by:
injectIntoWithIndexin interfaceReversibleDoubleIterable
-
distinct
public MutableDoubleList distinct()
- Specified by:
distinctin interfaceDoubleList- Specified by:
distinctin interfaceMutableDoubleList- Specified by:
distinctin interfaceReversibleDoubleIterable- Since:
- 6.0.
-
subList
public MutableDoubleList subList(int fromIndex, int toIndex)
- Specified by:
subListin interfaceDoubleList- Specified by:
subListin interfaceMutableDoubleList
-
zipDouble
public MutableList<DoubleDoublePair> zipDouble(DoubleIterable iterable)
- Specified by:
zipDoublein interfaceDoubleList- Specified by:
zipDoublein interfaceMutableDoubleList- Since:
- 9.1.
-
zip
public <T> MutableList<DoubleObjectPair<T>> zip(Iterable<T> iterable)
- Specified by:
zipin interfaceDoubleList- Specified by:
zipin interfaceMutableDoubleList- Since:
- 9.1.
-
selectWithIndex
public MutableDoubleList selectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceDoubleList- Specified by:
selectWithIndexin interfaceMutableDoubleList- Specified by:
selectWithIndexin interfaceOrderedDoubleIterable- Specified by:
selectWithIndexin interfaceReversibleDoubleIterable- 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
public MutableDoubleList rejectWithIndex(DoubleIntPredicate predicate)
Returns a new MutableDoubleList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceDoubleList- Specified by:
rejectWithIndexin interfaceMutableDoubleList- Specified by:
rejectWithIndexin interfaceOrderedDoubleIterable- Specified by:
rejectWithIndexin interfaceReversibleDoubleIterable- 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
public <V> MutableList<V> collectWithIndex(DoubleIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceDoubleList- Specified by:
collectWithIndexin interfaceMutableDoubleList- Specified by:
collectWithIndexin interfaceOrderedDoubleIterable- Specified by:
collectWithIndexin interfaceReversibleDoubleIterable- 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.
-
spliterator
public Spliterator.OfDouble spliterator()
This function needs to be synchronized manually- Specified by:
spliteratorin interfaceDoubleList
-
-