Class SynchronizedIntLongMap
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.SynchronizedIntLongMap
-
- All Implemented Interfaces:
Serializable
,LongIterable
,IntLongMap
,LongValuesMap
,MutableIntLongMap
,MutableLongValuesMap
,PrimitiveIterable
public class SynchronizedIntLongMap extends Object implements MutableIntLongMap, Serializable
A synchronized view of aMutableIntLongMap
. It is imperative that the user manually synchronize on the collection when iterating over it using theMutableLongIterator
as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitivePrimitiveMap.stg.
- Since:
- 3.1.
- See Also:
MutableIntLongMap.asSynchronized()
,MutableMap.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedIntLongMap(MutableIntLongMap map)
SynchronizedIntLongMap(MutableIntLongMap map, Object newLock)
-
Method Summary
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntLongMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.LongValuesMap
tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntLongMap
withAllKeyValues
-
-
-
-
Constructor Detail
-
SynchronizedIntLongMap
public SynchronizedIntLongMap(MutableIntLongMap map)
-
SynchronizedIntLongMap
public SynchronizedIntLongMap(MutableIntLongMap map, Object newLock)
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableLongValuesMap
-
put
public void put(int key, long value)
- Specified by:
put
in interfaceMutableIntLongMap
-
putPair
public void putPair(IntLongPair keyValuePair)
- Specified by:
putPair
in interfaceMutableIntLongMap
-
putAll
public void putAll(IntLongMap map)
- Specified by:
putAll
in interfaceMutableIntLongMap
-
updateValues
public void updateValues(IntLongToLongFunction function)
- Specified by:
updateValues
in interfaceMutableIntLongMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKey
in interfaceMutableIntLongMap
-
remove
public void remove(int key)
- Specified by:
remove
in interfaceMutableIntLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(int key, long value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableIntLongMap
-
getIfAbsentPut
public long getIfAbsentPut(int key, long value)
- Specified by:
getIfAbsentPut
in interfaceMutableIntLongMap
-
getAndPut
public long getAndPut(int key, long putValue, long defaultValue)
- Specified by:
getAndPut
in interfaceMutableIntLongMap
-
getIfAbsentPut
public long getIfAbsentPut(int key, LongFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableIntLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(int key, IntToLongFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableIntLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(int key, LongFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableIntLongMap
-
updateValue
public long updateValue(int key, long initialValueIfAbsent, LongToLongFunction function)
- Specified by:
updateValue
in interfaceMutableIntLongMap
-
get
public long get(int key)
- Specified by:
get
in interfaceIntLongMap
-
getIfAbsent
public long getIfAbsent(int key, long ifAbsent)
- Specified by:
getIfAbsent
in interfaceIntLongMap
-
getOrThrow
public long getOrThrow(int key)
- Specified by:
getOrThrow
in interfaceIntLongMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interfaceIntLongMap
-
containsValue
public boolean containsValue(long value)
- Specified by:
containsValue
in interfaceLongValuesMap
-
forEachValue
public void forEachValue(LongProcedure procedure)
- Specified by:
forEachValue
in interfaceLongValuesMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKey
in interfaceIntLongMap
-
forEachKeyValue
public void forEachKeyValue(IntLongProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceIntLongMap
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysView
in interfaceIntLongMap
-
keyValuesView
public RichIterable<IntLongPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceIntLongMap
-
flipUniqueValues
public MutableLongIntMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceIntLongMap
- Specified by:
flipUniqueValues
in interfaceMutableIntLongMap
-
select
public MutableIntLongMap select(IntLongPredicate predicate)
- Specified by:
select
in interfaceIntLongMap
- Specified by:
select
in interfaceMutableIntLongMap
-
reject
public MutableIntLongMap reject(IntLongPredicate predicate)
- Specified by:
reject
in interfaceIntLongMap
- Specified by:
reject
in interfaceMutableIntLongMap
-
longIterator
public MutableLongIterator longIterator()
This must be manually synchronized by the developer.- Specified by:
longIterator
in interfaceLongIterable
- Specified by:
longIterator
in interfaceMutableLongValuesMap
-
each
public void each(LongProcedure procedure)
- Specified by:
each
in interfaceLongIterable
- Since:
- 7.0.
-
count
public int count(LongPredicate predicate)
- Specified by:
count
in interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfy
in interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfy
in interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfy
in interfaceLongIterable
-
select
public MutableLongBag select(LongPredicate predicate)
- Specified by:
select
in interfaceLongIterable
- Specified by:
select
in interfaceLongValuesMap
- Specified by:
select
in interfaceMutableLongValuesMap
-
reject
public MutableLongBag reject(LongPredicate predicate)
- Specified by:
reject
in interfaceLongIterable
- Specified by:
reject
in interfaceLongValuesMap
- Specified by:
reject
in interfaceMutableLongValuesMap
-
collect
public <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceLongIterable
- Specified by:
collect
in interfaceLongValuesMap
- Specified by:
collect
in interfaceMutableLongValuesMap
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNone
in interfaceLongIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceLongIterable
-
max
public long max()
- Specified by:
max
in interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmpty
in interfaceLongIterable
-
min
public long min()
- Specified by:
min
in interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmpty
in interfaceLongIterable
-
average
public double average()
- Specified by:
average
in interfaceLongIterable
-
median
public double median()
- Specified by:
median
in interfaceLongIterable
-
addToValue
public long addToValue(int key, long toBeAdded)
- Specified by:
addToValue
in interfaceMutableIntLongMap
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArray
in interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedList
in interfaceLongIterable
-
toArray
public long[] toArray()
- Specified by:
toArray
in interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArray
in interfaceLongIterable
-
contains
public boolean contains(long value)
- Specified by:
contains
in interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAll
in interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAll
in interfaceLongIterable
-
toList
public MutableLongList toList()
- Specified by:
toList
in interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSet
in interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBag
in interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazy
in interfaceLongIterable
-
withKeyValue
public MutableIntLongMap withKeyValue(int key, long value)
- Specified by:
withKeyValue
in interfaceMutableIntLongMap
-
withoutKey
public MutableIntLongMap withoutKey(int key)
- Specified by:
withoutKey
in interfaceMutableIntLongMap
-
withoutAllKeys
public MutableIntLongMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableIntLongMap
-
asUnmodifiable
public MutableIntLongMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntLongMap
-
asSynchronized
public MutableIntLongMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntLongMap
-
toImmutable
public ImmutableIntLongMap toImmutable()
- Specified by:
toImmutable
in interfaceIntLongMap
-
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 MutableIntSet keySet()
- Specified by:
keySet
in interfaceIntLongMap
-
values
public MutableLongCollection values()
- Specified by:
values
in interfaceLongValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equals
in interfaceIntLongMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceIntLongMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceIntLongMap
- 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, ObjectLongToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunk
in interfaceLongIterable
-
-