Class SynchronizedDoubleIntMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedDoubleIntMap
-
- All Implemented Interfaces:
Serializable
,IntIterable
,DoubleIntMap
,IntValuesMap
,MutableDoubleIntMap
,MutableIntValuesMap
,PrimitiveIterable
public class SynchronizedDoubleIntMap extends Object implements MutableDoubleIntMap, Serializable
A synchronized view of aMutableDoubleIntMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableIntIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableDoubleIntMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedDoubleIntMap(MutableDoubleIntMap map)
SynchronizedDoubleIntMap(MutableDoubleIntMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.DoubleIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
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.IntValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableDoubleIntMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedDoubleIntMap
public SynchronizedDoubleIntMap(MutableDoubleIntMap map)
-
SynchronizedDoubleIntMap
public SynchronizedDoubleIntMap(MutableDoubleIntMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(double key, int value)
- Specified by:
put
in interfaceMutableDoubleIntMap
-
putPair
public void putPair(DoubleIntPair keyValuePair)
- Specified by:
putPair
in interfaceMutableDoubleIntMap
-
putAll
public void putAll(DoubleIntMap map)
- Specified by:
putAll
in interfaceMutableDoubleIntMap
-
updateValues
public void updateValues(DoubleIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableDoubleIntMap
-
removeKey
public void removeKey(double key)
- Specified by:
removeKey
in interfaceMutableDoubleIntMap
-
remove
public void remove(double key)
- Specified by:
remove
in interfaceMutableDoubleIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(double key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableDoubleIntMap
-
getIfAbsentPut
public int getIfAbsentPut(double key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableDoubleIntMap
-
getAndPut
public int getAndPut(double key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableDoubleIntMap
-
getIfAbsentPut
public int getIfAbsentPut(double key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableDoubleIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(double key, DoubleToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableDoubleIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(double key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableDoubleIntMap
-
updateValue
public int updateValue(double key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableDoubleIntMap
-
get
public int get(double key)
- Specified by:
get
in interfaceDoubleIntMap
-
getIfAbsent
public int getIfAbsent(double key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceDoubleIntMap
-
getOrThrow
public int getOrThrow(double key)
- Specified by:
getOrThrow
in interfaceDoubleIntMap
-
containsKey
public boolean containsKey(double key)
- Specified by:
containsKey
in interfaceDoubleIntMap
-
containsValue
public boolean containsValue(int value)
- Specified by:
containsValue
in interfaceIntValuesMap
-
forEachValue
public void forEachValue(IntProcedure procedure)
- Specified by:
forEachValue
in interfaceIntValuesMap
-
forEachKey
public void forEachKey(DoubleProcedure procedure)
- Specified by:
forEachKey
in interfaceDoubleIntMap
-
forEachKeyValue
public void forEachKeyValue(DoubleIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceDoubleIntMap
-
keysView
public LazyDoubleIterable keysView()
- Specified by:
keysView
in interfaceDoubleIntMap
-
keyValuesView
public RichIterable<DoubleIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceDoubleIntMap
-
flipUniqueValues
public MutableIntDoubleMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceDoubleIntMap
- Specified by:
flipUniqueValues
in interfaceMutableDoubleIntMap
-
select
public MutableDoubleIntMap select(DoubleIntPredicate predicate)
- Specified by:
select
in interfaceDoubleIntMap
- Specified by:
select
in interfaceMutableDoubleIntMap
-
reject
public MutableDoubleIntMap reject(DoubleIntPredicate predicate)
- Specified by:
reject
in interfaceDoubleIntMap
- Specified by:
reject
in interfaceMutableDoubleIntMap
-
intIterator
public MutableIntIterator intIterator()
This must be manually synchronized by the developer.- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
each
public void each(IntProcedure procedure)
- Specified by:
each
in interfaceIntIterable
- Since:
- 7.0.
-
count
public int count(IntPredicate predicate)
- Specified by:
count
in interfaceIntIterable
-
anySatisfy
public boolean anySatisfy(IntPredicate predicate)
- Specified by:
anySatisfy
in interfaceIntIterable
-
allSatisfy
public boolean allSatisfy(IntPredicate predicate)
- Specified by:
allSatisfy
in interfaceIntIterable
-
noneSatisfy
public boolean noneSatisfy(IntPredicate predicate)
- Specified by:
noneSatisfy
in interfaceIntIterable
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceIntValuesMap
- Specified by:
select
in interfaceMutableIntValuesMap
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceIntValuesMap
- Specified by:
reject
in interfaceMutableIntValuesMap
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceIntValuesMap
- Specified by:
collect
in interfaceMutableIntValuesMap
-
detectIfNone
public int detectIfNone(IntPredicate predicate, int ifNone)
- Specified by:
detectIfNone
in interfaceIntIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceIntIterable
-
max
public int max()
- Specified by:
max
in interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)
- Specified by:
maxIfEmpty
in interfaceIntIterable
-
min
public int min()
- Specified by:
min
in interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)
- Specified by:
minIfEmpty
in interfaceIntIterable
-
average
public double average()
- Specified by:
average
in interfaceIntIterable
-
median
public double median()
- Specified by:
median
in interfaceIntIterable
-
addToValue
public int addToValue(double key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableDoubleIntMap
-
toSortedArray
public int[] toSortedArray()
- Specified by:
toSortedArray
in interfaceIntIterable
-
toSortedList
public MutableIntList toSortedList()
- Specified by:
toSortedList
in interfaceIntIterable
-
toArray
public int[] toArray()
- Specified by:
toArray
in interfaceIntIterable
-
toArray
public int[] toArray(int[] target)
- Specified by:
toArray
in interfaceIntIterable
-
contains
public boolean contains(int value)
- Specified by:
contains
in interfaceIntIterable
-
containsAll
public boolean containsAll(int... source)
- Specified by:
containsAll
in interfaceIntIterable
-
containsAll
public boolean containsAll(IntIterable source)
- Specified by:
containsAll
in interfaceIntIterable
-
toList
public MutableIntList toList()
- Specified by:
toList
in interfaceIntIterable
-
toSet
public MutableIntSet toSet()
- Specified by:
toSet
in interfaceIntIterable
-
toBag
public MutableIntBag toBag()
- Specified by:
toBag
in interfaceIntIterable
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
-
withKeyValue
public MutableDoubleIntMap withKeyValue(double key, int value)
- Specified by:
withKeyValue
in interfaceMutableDoubleIntMap
-
withoutKey
public MutableDoubleIntMap withoutKey(double key)
- Specified by:
withoutKey
in interfaceMutableDoubleIntMap
-
withoutAllKeys
public MutableDoubleIntMap withoutAllKeys(DoubleIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableDoubleIntMap
-
asUnmodifiable
public MutableDoubleIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableDoubleIntMap
-
asSynchronized
public MutableDoubleIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableDoubleIntMap
-
toImmutable
public ImmutableDoubleIntMap toImmutable()
- Specified by:
toImmutable
in interfaceDoubleIntMap
-
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 MutableDoubleSet keySet()
- Specified by:
keySet
in interfaceDoubleIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceDoubleIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceDoubleIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceDoubleIntMap
- 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, ObjectIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceIntIterable
-
chunk
public RichIterable<IntIterable> chunk(int size)
- Specified by:
chunk
in interfaceIntIterable
-
-