Class SynchronizedLongIntMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedLongIntMap
-
- All Implemented Interfaces:
Serializable
,IntIterable
,IntValuesMap
,LongIntMap
,MutableIntValuesMap
,MutableLongIntMap
,PrimitiveIterable
public class SynchronizedLongIntMap extends Object implements MutableLongIntMap, Serializable
A synchronized view of aMutableLongIntMap
. 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:
MutableLongIntMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedLongIntMap(MutableLongIntMap map)
SynchronizedLongIntMap(MutableLongIntMap map, Object newLock)
-
Method Summary
-
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.LongIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongIntMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedLongIntMap
public SynchronizedLongIntMap(MutableLongIntMap map)
-
SynchronizedLongIntMap
public SynchronizedLongIntMap(MutableLongIntMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(long key, int value)
- Specified by:
put
in interfaceMutableLongIntMap
-
putPair
public void putPair(LongIntPair keyValuePair)
- Specified by:
putPair
in interfaceMutableLongIntMap
-
putAll
public void putAll(LongIntMap map)
- Specified by:
putAll
in interfaceMutableLongIntMap
-
updateValues
public void updateValues(LongIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableLongIntMap
-
removeKey
public void removeKey(long key)
- Specified by:
removeKey
in interfaceMutableLongIntMap
-
remove
public void remove(long key)
- Specified by:
remove
in interfaceMutableLongIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(long key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableLongIntMap
-
getIfAbsentPut
public int getIfAbsentPut(long key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableLongIntMap
-
getAndPut
public int getAndPut(long key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableLongIntMap
-
getIfAbsentPut
public int getIfAbsentPut(long key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableLongIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(long key, LongToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableLongIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(long key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableLongIntMap
-
updateValue
public int updateValue(long key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableLongIntMap
-
get
public int get(long key)
- Specified by:
get
in interfaceLongIntMap
-
getIfAbsent
public int getIfAbsent(long key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceLongIntMap
-
getOrThrow
public int getOrThrow(long key)
- Specified by:
getOrThrow
in interfaceLongIntMap
-
containsKey
public boolean containsKey(long key)
- Specified by:
containsKey
in interfaceLongIntMap
-
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(LongProcedure procedure)
- Specified by:
forEachKey
in interfaceLongIntMap
-
forEachKeyValue
public void forEachKeyValue(LongIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceLongIntMap
-
keysView
public LazyLongIterable keysView()
- Specified by:
keysView
in interfaceLongIntMap
-
keyValuesView
public RichIterable<LongIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceLongIntMap
-
flipUniqueValues
public MutableIntLongMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceLongIntMap
- Specified by:
flipUniqueValues
in interfaceMutableLongIntMap
-
select
public MutableLongIntMap select(LongIntPredicate predicate)
- Specified by:
select
in interfaceLongIntMap
- Specified by:
select
in interfaceMutableLongIntMap
-
reject
public MutableLongIntMap reject(LongIntPredicate predicate)
- Specified by:
reject
in interfaceLongIntMap
- Specified by:
reject
in interfaceMutableLongIntMap
-
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(long key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableLongIntMap
-
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 MutableLongIntMap withKeyValue(long key, int value)
- Specified by:
withKeyValue
in interfaceMutableLongIntMap
-
withoutKey
public MutableLongIntMap withoutKey(long key)
- Specified by:
withoutKey
in interfaceMutableLongIntMap
-
withoutAllKeys
public MutableLongIntMap withoutAllKeys(LongIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableLongIntMap
-
asUnmodifiable
public MutableLongIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongIntMap
-
asSynchronized
public MutableLongIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongIntMap
-
toImmutable
public ImmutableLongIntMap toImmutable()
- Specified by:
toImmutable
in interfaceLongIntMap
-
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 MutableLongSet keySet()
- Specified by:
keySet
in interfaceLongIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceLongIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceLongIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceLongIntMap
- 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
-
-