public static class Int2LongMaps.UnmodifyableMap extends AbstractInt2LongMap implements Int2LongMap
AbstractInt2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2LongMap.BuilderCache, Int2LongMap.Entry, Int2LongMap.FastEntrySet, Int2LongMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
long |
addTo(int key,
long value)
A Helper method to add a primitives together.
|
void |
clear() |
long |
computeLong(int key,
IntLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(int key,
Int2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(int key,
IntLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Int2LongMap |
copy()
A Function that does a shallow clone of the Map itself.
|
long |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(int key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2LongMap.Entry> |
int2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
void |
mergeAllLong(Int2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(int key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
long |
put(int key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(int key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
removeOrDefault(int key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceLongs(Int2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(IntLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
long |
subFrom(int key,
long value)
A Helper method to subtract from primitive from each other.
|
long |
supplyLongIfAbsent(int key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
LongCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiableapplyAsLongpublic long put(int key,
long value)
Int2LongMapput in interface Int2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(int key,
long value)
Int2LongMapputIfAbsent in interface Int2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(int key,
long value)
Int2LongMapaddTo in interface Int2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(int key,
long value)
Int2LongMapInt2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2LongMapkey - that should be subtract fromvalue - that should be subtractpublic long remove(int key)
Int2LongMapremove in interface Int2LongMapkey - the element that should be removedpublic long removeOrDefault(int key,
long defaultValue)
Int2LongMapremoveOrDefault in interface Int2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
long value)
Int2LongMapremove in interface Int2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long get(int key)
Int2LongMapget in interface Int2LongFunctionget in interface Int2LongMapkey - the key that is searched forpublic long getOrDefault(int key,
long defaultValue)
Int2LongMapgetOrDefault in interface Int2LongMapgetOrDefault in class AbstractInt2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long computeLong(int key,
IntLongUnaryOperator mappingFunction)
Int2LongMapcomputeLong in interface Int2LongMapcomputeLong in class AbstractInt2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(int key,
Int2LongFunction mappingFunction)
Int2LongMapcomputeLongIfAbsent in interface Int2LongMapcomputeLongIfAbsent in class AbstractInt2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(int key,
IntLongUnaryOperator mappingFunction)
Int2LongMapcomputeLongIfPresent in interface Int2LongMapcomputeLongIfPresent in class AbstractInt2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long supplyLongIfAbsent(int key,
LongSupplier valueProvider)
Int2LongMapsupplyLongIfAbsent in interface Int2LongMapsupplyLongIfAbsent in class AbstractInt2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long mergeLong(int key,
long value,
LongLongUnaryOperator mappingFunction)
Int2LongMapmergeLong in interface Int2LongMapmergeLong in class AbstractInt2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Int2LongMap m, LongLongUnaryOperator mappingFunction)
Int2LongMapmergeAllLong in interface Int2LongMapmergeAllLong in class AbstractInt2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceLongs(IntLongUnaryOperator mappingFunction)
Int2LongMapreplaceLongs in interface Int2LongMapreplaceLongs in class AbstractInt2LongMapmappingFunction - operation to replace all valuespublic void replaceLongs(Int2LongMap m)
Int2LongMapreplaceLongs in interface Int2LongMapreplaceLongs in class AbstractInt2LongMapm - elements that should be replaced.public Int2LongMap copy()
Int2LongMapcopy in interface Int2LongMapcopy in class AbstractInt2LongMappublic void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Long>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Long>public IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Long>keySet in interface Int2LongMapkeySet in class AbstractInt2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Long>values in interface Int2LongMapvalues in class AbstractInt2LongMappublic ObjectSet<Int2LongMap.Entry> int2LongEntrySet()
Int2LongMapint2LongEntrySet in interface Int2LongMap