Class SynchronizedObjectDoubleMap<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedObjectDoubleMap<K>
-
- All Implemented Interfaces:
Serializable
,DoubleIterable
,MutableObjectDoubleMap<K>
,ObjectDoubleMap<K>
,PrimitiveIterable
public class SynchronizedObjectDoubleMap<K> extends Object implements MutableObjectDoubleMap<K>, Serializable
A synchronized view of aMutableObjectDoubleMap
. It is imperative that the user manually synchronize on the collection when iterating over it using the DoubleIterator as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedObjectPrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableObjectDoubleMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedObjectDoubleMap(MutableObjectDoubleMap<K> map)
SynchronizedObjectDoubleMap(MutableObjectDoubleMap<K> map, Object newLock)
-
Method Summary
-
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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectDoubleMap
tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectDoubleMap
injectIntoKeyValue
-
-
-
-
Constructor Detail
-
SynchronizedObjectDoubleMap
public SynchronizedObjectDoubleMap(MutableObjectDoubleMap<K> map)
-
SynchronizedObjectDoubleMap
public SynchronizedObjectDoubleMap(MutableObjectDoubleMap<K> map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableObjectDoubleMap<K>
-
put
public void put(K key, double value)
- Specified by:
put
in interfaceMutableObjectDoubleMap<K>
-
putPair
public void putPair(ObjectDoublePair<K> keyValuePair)
- Specified by:
putPair
in interfaceMutableObjectDoubleMap<K>
-
putAll
public void putAll(ObjectDoubleMap<? extends K> map)
- Specified by:
putAll
in interfaceMutableObjectDoubleMap<K>
-
updateValues
public void updateValues(ObjectDoubleToDoubleFunction<? super K> function)
- Specified by:
updateValues
in interfaceMutableObjectDoubleMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKey
in interfaceMutableObjectDoubleMap<K>
-
remove
public void remove(Object key)
- Specified by:
remove
in interfaceMutableObjectDoubleMap<K>
-
removeKeyIfAbsent
public double removeKeyIfAbsent(K key, double value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableObjectDoubleMap<K>
-
getIfAbsentPut
public double getIfAbsentPut(K key, double value)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectDoubleMap<K>
-
getAndPut
public double getAndPut(K key, double putValue, double defaultValue)
- Specified by:
getAndPut
in interfaceMutableObjectDoubleMap<K>
-
getIfAbsentPut
public double getIfAbsentPut(K key, DoubleFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectDoubleMap<K>
-
getIfAbsentPutWithKey
public double getIfAbsentPutWithKey(K key, DoubleFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableObjectDoubleMap<K>
-
getIfAbsentPutWith
public <P> double getIfAbsentPutWith(K key, DoubleFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableObjectDoubleMap<K>
-
updateValue
public double updateValue(K key, double initialValueIfAbsent, DoubleToDoubleFunction function)
- Specified by:
updateValue
in interfaceMutableObjectDoubleMap<K>
-
get
public double get(Object key)
- Specified by:
get
in interfaceObjectDoubleMap<K>
-
getOrThrow
public double getOrThrow(Object key)
- Specified by:
getOrThrow
in interfaceObjectDoubleMap<K>
-
getIfAbsent
public double getIfAbsent(Object key, double ifAbsent)
- Specified by:
getIfAbsent
in interfaceObjectDoubleMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceObjectDoubleMap<K>
-
containsValue
public boolean containsValue(double value)
- Specified by:
containsValue
in interfaceObjectDoubleMap<K>
-
forEachValue
public void forEachValue(DoubleProcedure procedure)
- Specified by:
forEachValue
in interfaceObjectDoubleMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKey
in interfaceObjectDoubleMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectDoubleProcedure<? super K> procedure)
- Specified by:
forEachKeyValue
in interfaceObjectDoubleMap<K>
-
select
public MutableObjectDoubleMap<K> select(ObjectDoublePredicate<? super K> predicate)
- Specified by:
select
in interfaceMutableObjectDoubleMap<K>
- Specified by:
select
in interfaceObjectDoubleMap<K>
-
reject
public MutableObjectDoubleMap<K> reject(ObjectDoublePredicate<? super K> predicate)
- Specified by:
reject
in interfaceMutableObjectDoubleMap<K>
- Specified by:
reject
in interfaceObjectDoubleMap<K>
-
doubleIterator
public MutableDoubleIterator doubleIterator()
Must be called in a synchronized block.- Specified by:
doubleIterator
in interfaceDoubleIterable
- Specified by:
doubleIterator
in interfaceMutableObjectDoubleMap<K>
-
each
public void each(DoubleProcedure procedure)
- Specified by:
each
in interfaceDoubleIterable
- Since:
- 7.0.
-
count
public int count(DoublePredicate predicate)
- Specified by:
count
in interfaceDoubleIterable
-
anySatisfy
public boolean anySatisfy(DoublePredicate predicate)
- Specified by:
anySatisfy
in interfaceDoubleIterable
-
allSatisfy
public boolean allSatisfy(DoublePredicate predicate)
- Specified by:
allSatisfy
in interfaceDoubleIterable
-
noneSatisfy
public boolean noneSatisfy(DoublePredicate predicate)
- Specified by:
noneSatisfy
in interfaceDoubleIterable
-
select
public MutableDoubleCollection select(DoublePredicate predicate)
- Specified by:
select
in interfaceDoubleIterable
- Specified by:
select
in interfaceMutableObjectDoubleMap<K>
-
reject
public MutableDoubleCollection reject(DoublePredicate predicate)
- Specified by:
reject
in interfaceDoubleIterable
- Specified by:
reject
in interfaceMutableObjectDoubleMap<K>
-
detectIfNone
public double detectIfNone(DoublePredicate predicate, double ifNone)
- Specified by:
detectIfNone
in interfaceDoubleIterable
-
collect
public <V1> MutableCollection<V1> collect(DoubleToObjectFunction<? extends V1> function)
- Specified by:
collect
in interfaceDoubleIterable
- Specified by:
collect
in interfaceMutableObjectDoubleMap<K>
-
sum
public double sum()
- Specified by:
sum
in interfaceDoubleIterable
-
addToValue
public double addToValue(K key, double toBeAdded)
- Specified by:
addToValue
in interfaceMutableObjectDoubleMap<K>
-
max
public double max()
- Specified by:
max
in interfaceDoubleIterable
-
maxIfEmpty
public double maxIfEmpty(double defaultValue)
- Specified by:
maxIfEmpty
in interfaceDoubleIterable
-
min
public double min()
- Specified by:
min
in interfaceDoubleIterable
-
minIfEmpty
public double minIfEmpty(double defaultValue)
- Specified by:
minIfEmpty
in interfaceDoubleIterable
-
average
public double average()
- Specified by:
average
in interfaceDoubleIterable
-
median
public double median()
- Specified by:
median
in interfaceDoubleIterable
-
toSortedArray
public double[] toSortedArray()
- Specified by:
toSortedArray
in interfaceDoubleIterable
-
toSortedList
public MutableDoubleList toSortedList()
- Specified by:
toSortedList
in interfaceDoubleIterable
-
toArray
public double[] toArray()
- Specified by:
toArray
in interfaceDoubleIterable
-
toArray
public double[] toArray(double[] target)
- Specified by:
toArray
in interfaceDoubleIterable
-
contains
public boolean contains(double value)
- Specified by:
contains
in interfaceDoubleIterable
-
containsAll
public boolean containsAll(double... source)
- Specified by:
containsAll
in interfaceDoubleIterable
-
containsAll
public boolean containsAll(DoubleIterable source)
- Specified by:
containsAll
in interfaceDoubleIterable
-
toList
public MutableDoubleList toList()
- Specified by:
toList
in interfaceDoubleIterable
-
toSet
public MutableDoubleSet toSet()
- Specified by:
toSet
in interfaceDoubleIterable
-
toBag
public MutableDoubleBag toBag()
- Specified by:
toBag
in interfaceDoubleIterable
-
asLazy
public LazyDoubleIterable asLazy()
- Specified by:
asLazy
in interfaceDoubleIterable
-
withKeyValue
public MutableObjectDoubleMap<K> withKeyValue(K key, double value)
- Specified by:
withKeyValue
in interfaceMutableObjectDoubleMap<K>
-
withoutKey
public MutableObjectDoubleMap<K> withoutKey(K key)
- Specified by:
withoutKey
in interfaceMutableObjectDoubleMap<K>
-
withoutAllKeys
public MutableObjectDoubleMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeys
in interfaceMutableObjectDoubleMap<K>
-
asUnmodifiable
public MutableObjectDoubleMap<K> asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableObjectDoubleMap<K>
-
asSynchronized
public MutableObjectDoubleMap<K> asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableObjectDoubleMap<K>
-
toImmutable
public ImmutableObjectDoubleMap<K> toImmutable()
- Specified by:
toImmutable
in interfaceObjectDoubleMap<K>
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
keySet
public Set<K> keySet()
- Specified by:
keySet
in interfaceObjectDoubleMap<K>
-
values
public MutableDoubleCollection values()
- Specified by:
values
in interfaceObjectDoubleMap<K>
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysView
in interfaceObjectDoubleMap<K>
-
keyValuesView
public RichIterable<ObjectDoublePair<K>> keyValuesView()
- Specified by:
keyValuesView
in interfaceObjectDoubleMap<K>
-
flipUniqueValues
public MutableDoubleObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableObjectDoubleMap<K>
- Specified by:
flipUniqueValues
in interfaceObjectDoubleMap<K>
-
toString
public String toString()
- Specified by:
toString
in interfaceObjectDoubleMap<K>
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classObject
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceDoubleIterable
-
chunk
public RichIterable<DoubleIterable> chunk(int size)
- Specified by:
chunk
in interfaceDoubleIterable
-
-