Class SynchronizedObjectFloatMap<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedObjectFloatMap<K>
-
- All Implemented Interfaces:
Serializable
,FloatIterable
,MutableObjectFloatMap<K>
,ObjectFloatMap<K>
,PrimitiveIterable
public class SynchronizedObjectFloatMap<K> extends Object implements MutableObjectFloatMap<K>, Serializable
A synchronized view of aMutableObjectFloatMap
. It is imperative that the user manually synchronize on the collection when iterating over it using the FloatIterator as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedObjectPrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableObjectFloatMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedObjectFloatMap(MutableObjectFloatMap<K> map)
SynchronizedObjectFloatMap(MutableObjectFloatMap<K> map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.FloatIterable
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.MutableObjectFloatMap
tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectFloatMap
injectIntoKeyValue
-
-
-
-
Constructor Detail
-
SynchronizedObjectFloatMap
public SynchronizedObjectFloatMap(MutableObjectFloatMap<K> map)
-
SynchronizedObjectFloatMap
public SynchronizedObjectFloatMap(MutableObjectFloatMap<K> map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableObjectFloatMap<K>
-
put
public void put(K key, float value)
- Specified by:
put
in interfaceMutableObjectFloatMap<K>
-
putPair
public void putPair(ObjectFloatPair<K> keyValuePair)
- Specified by:
putPair
in interfaceMutableObjectFloatMap<K>
-
putAll
public void putAll(ObjectFloatMap<? extends K> map)
- Specified by:
putAll
in interfaceMutableObjectFloatMap<K>
-
updateValues
public void updateValues(ObjectFloatToFloatFunction<? super K> function)
- Specified by:
updateValues
in interfaceMutableObjectFloatMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKey
in interfaceMutableObjectFloatMap<K>
-
remove
public void remove(Object key)
- Specified by:
remove
in interfaceMutableObjectFloatMap<K>
-
removeKeyIfAbsent
public float removeKeyIfAbsent(K key, float value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableObjectFloatMap<K>
-
getIfAbsentPut
public float getIfAbsentPut(K key, float value)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectFloatMap<K>
-
getAndPut
public float getAndPut(K key, float putValue, float defaultValue)
- Specified by:
getAndPut
in interfaceMutableObjectFloatMap<K>
-
getIfAbsentPut
public float getIfAbsentPut(K key, FloatFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableObjectFloatMap<K>
-
getIfAbsentPutWithKey
public float getIfAbsentPutWithKey(K key, FloatFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableObjectFloatMap<K>
-
getIfAbsentPutWith
public <P> float getIfAbsentPutWith(K key, FloatFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableObjectFloatMap<K>
-
updateValue
public float updateValue(K key, float initialValueIfAbsent, FloatToFloatFunction function)
- Specified by:
updateValue
in interfaceMutableObjectFloatMap<K>
-
get
public float get(Object key)
- Specified by:
get
in interfaceObjectFloatMap<K>
-
getOrThrow
public float getOrThrow(Object key)
- Specified by:
getOrThrow
in interfaceObjectFloatMap<K>
-
getIfAbsent
public float getIfAbsent(Object key, float ifAbsent)
- Specified by:
getIfAbsent
in interfaceObjectFloatMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceObjectFloatMap<K>
-
containsValue
public boolean containsValue(float value)
- Specified by:
containsValue
in interfaceObjectFloatMap<K>
-
forEachValue
public void forEachValue(FloatProcedure procedure)
- Specified by:
forEachValue
in interfaceObjectFloatMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKey
in interfaceObjectFloatMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectFloatProcedure<? super K> procedure)
- Specified by:
forEachKeyValue
in interfaceObjectFloatMap<K>
-
select
public MutableObjectFloatMap<K> select(ObjectFloatPredicate<? super K> predicate)
- Specified by:
select
in interfaceMutableObjectFloatMap<K>
- Specified by:
select
in interfaceObjectFloatMap<K>
-
reject
public MutableObjectFloatMap<K> reject(ObjectFloatPredicate<? super K> predicate)
- Specified by:
reject
in interfaceMutableObjectFloatMap<K>
- Specified by:
reject
in interfaceObjectFloatMap<K>
-
floatIterator
public MutableFloatIterator floatIterator()
Must be called in a synchronized block.- Specified by:
floatIterator
in interfaceFloatIterable
- Specified by:
floatIterator
in interfaceMutableObjectFloatMap<K>
-
each
public void each(FloatProcedure procedure)
- Specified by:
each
in interfaceFloatIterable
- Since:
- 7.0.
-
count
public int count(FloatPredicate predicate)
- Specified by:
count
in interfaceFloatIterable
-
anySatisfy
public boolean anySatisfy(FloatPredicate predicate)
- Specified by:
anySatisfy
in interfaceFloatIterable
-
allSatisfy
public boolean allSatisfy(FloatPredicate predicate)
- Specified by:
allSatisfy
in interfaceFloatIterable
-
noneSatisfy
public boolean noneSatisfy(FloatPredicate predicate)
- Specified by:
noneSatisfy
in interfaceFloatIterable
-
select
public MutableFloatCollection select(FloatPredicate predicate)
- Specified by:
select
in interfaceFloatIterable
- Specified by:
select
in interfaceMutableObjectFloatMap<K>
-
reject
public MutableFloatCollection reject(FloatPredicate predicate)
- Specified by:
reject
in interfaceFloatIterable
- Specified by:
reject
in interfaceMutableObjectFloatMap<K>
-
detectIfNone
public float detectIfNone(FloatPredicate predicate, float ifNone)
- Specified by:
detectIfNone
in interfaceFloatIterable
-
collect
public <V1> MutableCollection<V1> collect(FloatToObjectFunction<? extends V1> function)
- Specified by:
collect
in interfaceFloatIterable
- Specified by:
collect
in interfaceMutableObjectFloatMap<K>
-
sum
public double sum()
- Specified by:
sum
in interfaceFloatIterable
-
addToValue
public float addToValue(K key, float toBeAdded)
- Specified by:
addToValue
in interfaceMutableObjectFloatMap<K>
-
max
public float max()
- Specified by:
max
in interfaceFloatIterable
-
maxIfEmpty
public float maxIfEmpty(float defaultValue)
- Specified by:
maxIfEmpty
in interfaceFloatIterable
-
min
public float min()
- Specified by:
min
in interfaceFloatIterable
-
minIfEmpty
public float minIfEmpty(float defaultValue)
- Specified by:
minIfEmpty
in interfaceFloatIterable
-
average
public double average()
- Specified by:
average
in interfaceFloatIterable
-
median
public double median()
- Specified by:
median
in interfaceFloatIterable
-
toSortedArray
public float[] toSortedArray()
- Specified by:
toSortedArray
in interfaceFloatIterable
-
toSortedList
public MutableFloatList toSortedList()
- Specified by:
toSortedList
in interfaceFloatIterable
-
toArray
public float[] toArray()
- Specified by:
toArray
in interfaceFloatIterable
-
toArray
public float[] toArray(float[] target)
- Specified by:
toArray
in interfaceFloatIterable
-
contains
public boolean contains(float value)
- Specified by:
contains
in interfaceFloatIterable
-
containsAll
public boolean containsAll(float... source)
- Specified by:
containsAll
in interfaceFloatIterable
-
containsAll
public boolean containsAll(FloatIterable source)
- Specified by:
containsAll
in interfaceFloatIterable
-
toList
public MutableFloatList toList()
- Specified by:
toList
in interfaceFloatIterable
-
toSet
public MutableFloatSet toSet()
- Specified by:
toSet
in interfaceFloatIterable
-
toBag
public MutableFloatBag toBag()
- Specified by:
toBag
in interfaceFloatIterable
-
asLazy
public LazyFloatIterable asLazy()
- Specified by:
asLazy
in interfaceFloatIterable
-
withKeyValue
public MutableObjectFloatMap<K> withKeyValue(K key, float value)
- Specified by:
withKeyValue
in interfaceMutableObjectFloatMap<K>
-
withoutKey
public MutableObjectFloatMap<K> withoutKey(K key)
- Specified by:
withoutKey
in interfaceMutableObjectFloatMap<K>
-
withoutAllKeys
public MutableObjectFloatMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeys
in interfaceMutableObjectFloatMap<K>
-
asUnmodifiable
public MutableObjectFloatMap<K> asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableObjectFloatMap<K>
-
asSynchronized
public MutableObjectFloatMap<K> asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableObjectFloatMap<K>
-
toImmutable
public ImmutableObjectFloatMap<K> toImmutable()
- Specified by:
toImmutable
in interfaceObjectFloatMap<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 interfaceObjectFloatMap<K>
-
values
public MutableFloatCollection values()
- Specified by:
values
in interfaceObjectFloatMap<K>
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysView
in interfaceObjectFloatMap<K>
-
keyValuesView
public RichIterable<ObjectFloatPair<K>> keyValuesView()
- Specified by:
keyValuesView
in interfaceObjectFloatMap<K>
-
flipUniqueValues
public MutableFloatObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableObjectFloatMap<K>
- Specified by:
flipUniqueValues
in interfaceObjectFloatMap<K>
-
toString
public String toString()
- Specified by:
toString
in interfaceObjectFloatMap<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, ObjectFloatToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceFloatIterable
-
chunk
public RichIterable<FloatIterable> chunk(int size)
- Specified by:
chunk
in interfaceFloatIterable
-
-