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 theMutableLongIteratoras 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:
clearin interfaceMutableLongValuesMap
-
put
public void put(int key, long value)- Specified by:
putin interfaceMutableIntLongMap
-
putPair
public void putPair(IntLongPair keyValuePair)
- Specified by:
putPairin interfaceMutableIntLongMap
-
putAll
public void putAll(IntLongMap map)
- Specified by:
putAllin interfaceMutableIntLongMap
-
updateValues
public void updateValues(IntLongToLongFunction function)
- Specified by:
updateValuesin interfaceMutableIntLongMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKeyin interfaceMutableIntLongMap
-
remove
public void remove(int key)
- Specified by:
removein interfaceMutableIntLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(int key, long value)- Specified by:
removeKeyIfAbsentin interfaceMutableIntLongMap
-
getIfAbsentPut
public long getIfAbsentPut(int key, long value)- Specified by:
getIfAbsentPutin interfaceMutableIntLongMap
-
getAndPut
public long getAndPut(int key, long putValue, long defaultValue)- Specified by:
getAndPutin interfaceMutableIntLongMap
-
getIfAbsentPut
public long getIfAbsentPut(int key, LongFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableIntLongMap
-
getIfAbsentPutWithKey
public long getIfAbsentPutWithKey(int key, IntToLongFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntLongMap
-
getIfAbsentPutWith
public <P> long getIfAbsentPutWith(int key, LongFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableIntLongMap
-
updateValue
public long updateValue(int key, long initialValueIfAbsent, LongToLongFunction function)- Specified by:
updateValuein interfaceMutableIntLongMap
-
get
public long get(int key)
- Specified by:
getin interfaceIntLongMap
-
getIfAbsent
public long getIfAbsent(int key, long ifAbsent)- Specified by:
getIfAbsentin interfaceIntLongMap
-
getOrThrow
public long getOrThrow(int key)
- Specified by:
getOrThrowin interfaceIntLongMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKeyin interfaceIntLongMap
-
containsValue
public boolean containsValue(long value)
- Specified by:
containsValuein interfaceLongValuesMap
-
forEachValue
public void forEachValue(LongProcedure procedure)
- Specified by:
forEachValuein interfaceLongValuesMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKeyin interfaceIntLongMap
-
forEachKeyValue
public void forEachKeyValue(IntLongProcedure procedure)
- Specified by:
forEachKeyValuein interfaceIntLongMap
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysViewin interfaceIntLongMap
-
keyValuesView
public RichIterable<IntLongPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceIntLongMap
-
flipUniqueValues
public MutableLongIntMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceIntLongMap- Specified by:
flipUniqueValuesin interfaceMutableIntLongMap
-
select
public MutableIntLongMap select(IntLongPredicate predicate)
- Specified by:
selectin interfaceIntLongMap- Specified by:
selectin interfaceMutableIntLongMap
-
reject
public MutableIntLongMap reject(IntLongPredicate predicate)
- Specified by:
rejectin interfaceIntLongMap- Specified by:
rejectin interfaceMutableIntLongMap
-
longIterator
public MutableLongIterator longIterator()
This must be manually synchronized by the developer.- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongValuesMap
-
each
public void each(LongProcedure procedure)
- Specified by:
eachin interfaceLongIterable- Since:
- 7.0.
-
count
public int count(LongPredicate predicate)
- Specified by:
countin interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfyin interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfyin interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfyin interfaceLongIterable
-
select
public MutableLongBag select(LongPredicate predicate)
- Specified by:
selectin interfaceLongIterable- Specified by:
selectin interfaceLongValuesMap- Specified by:
selectin interfaceMutableLongValuesMap
-
reject
public MutableLongBag reject(LongPredicate predicate)
- Specified by:
rejectin interfaceLongIterable- Specified by:
rejectin interfaceLongValuesMap- Specified by:
rejectin interfaceMutableLongValuesMap
-
collect
public <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceLongIterable- Specified by:
collectin interfaceLongValuesMap- Specified by:
collectin interfaceMutableLongValuesMap
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNonein interfaceLongIterable
-
sum
public long sum()
- Specified by:
sumin interfaceLongIterable
-
max
public long max()
- Specified by:
maxin interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmptyin interfaceLongIterable
-
min
public long min()
- Specified by:
minin interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmptyin interfaceLongIterable
-
average
public double average()
- Specified by:
averagein interfaceLongIterable
-
median
public double median()
- Specified by:
medianin interfaceLongIterable
-
addToValue
public long addToValue(int key, long toBeAdded)- Specified by:
addToValuein interfaceMutableIntLongMap
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArrayin interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedListin interfaceLongIterable
-
toArray
public long[] toArray()
- Specified by:
toArrayin interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArrayin interfaceLongIterable
-
contains
public boolean contains(long value)
- Specified by:
containsin interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAllin interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAllin interfaceLongIterable
-
toList
public MutableLongList toList()
- Specified by:
toListin interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSetin interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBagin interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazyin interfaceLongIterable
-
withKeyValue
public MutableIntLongMap withKeyValue(int key, long value)
- Specified by:
withKeyValuein interfaceMutableIntLongMap
-
withoutKey
public MutableIntLongMap withoutKey(int key)
- Specified by:
withoutKeyin interfaceMutableIntLongMap
-
withoutAllKeys
public MutableIntLongMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableIntLongMap
-
asUnmodifiable
public MutableIntLongMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntLongMap
-
asSynchronized
public MutableIntLongMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntLongMap
-
toImmutable
public ImmutableIntLongMap toImmutable()
- Specified by:
toImmutablein interfaceIntLongMap
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
keySet
public MutableIntSet keySet()
- Specified by:
keySetin interfaceIntLongMap
-
values
public MutableLongCollection values()
- Specified by:
valuesin interfaceLongValuesMap
-
equals
public boolean equals(Object otherMap)
- Specified by:
equalsin interfaceIntLongMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceIntLongMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceIntLongMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunkin interfaceLongIterable
-
-