public static class Long2LongMaps.EmptyMap extends AbstractLong2LongMap
AbstractLong2LongMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2LongMap.BuilderCache, Long2LongMap.Entry, Long2LongMap.FastEntrySet, Long2LongMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
long |
addTo(long key,
long value)
A Helper method to add a primitives together.
|
long |
computeLong(long key,
LongLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(long key,
LongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(long key,
LongLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Long2LongMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
long |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
long |
getOrDefault(long key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2LongMap.Entry> |
long2LongEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
mergeAllLong(Long2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(long key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
long |
put(long key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
putIfAbsent(long key,
long value)
Type Specific method to reduce boxing/unboxing of values
|
long |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
long value)
Type Specific remove function to reduce boxing/unboxing
|
long |
removeOrDefault(long key,
long defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
long |
subFrom(long key,
long value)
A Helper method to subtract from primitive from each other.
|
long |
supplyLongIfAbsent(long 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, replaceLongs, replaceLongs, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsLong, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiableandThen, compose, identitypublic long put(long key,
long value)
Long2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public long putIfAbsent(long key,
long value)
Long2LongMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public long addTo(long key,
long value)
Long2LongMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic long subFrom(long key,
long value)
Long2LongMapLong2LongMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic long remove(long key)
Long2LongMapkey - the element that should be removedpublic long removeOrDefault(long key,
long defaultValue)
Long2LongMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(long key,
long value)
Long2LongMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public long get(long key)
Long2LongMapkey - the key that is searched forpublic long getOrDefault(long key,
long defaultValue)
Long2LongMapgetOrDefault in interface Long2LongMapgetOrDefault in class AbstractLong2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic long computeLong(long key,
LongLongUnaryOperator mappingFunction)
Long2LongMapcomputeLong in interface Long2LongMapcomputeLong in class AbstractLong2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(long key,
LongUnaryOperator mappingFunction)
Long2LongMapcomputeLongIfAbsent in interface Long2LongMapcomputeLongIfAbsent in class AbstractLong2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long computeLongIfPresent(long key,
LongLongUnaryOperator mappingFunction)
Long2LongMapcomputeLongIfPresent in interface Long2LongMapcomputeLongIfPresent in class AbstractLong2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long supplyLongIfAbsent(long key,
LongSupplier valueProvider)
Long2LongMapsupplyLongIfAbsent in interface Long2LongMapsupplyLongIfAbsent in class AbstractLong2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long mergeLong(long key,
long value,
LongLongUnaryOperator mappingFunction)
Long2LongMapmergeLong in interface Long2LongMapmergeLong in class AbstractLong2LongMapkey - 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(Long2LongMap m, LongLongUnaryOperator mappingFunction)
Long2LongMapmergeAllLong in interface Long2LongMapmergeAllLong in class AbstractLong2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Long>keySet in interface Long2LongMapkeySet in class AbstractLong2LongMappublic LongCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Long>values in interface Long2LongMapvalues in class AbstractLong2LongMappublic ObjectSet<Long2LongMap.Entry> long2LongEntrySet()
Long2LongMappublic Long2LongMaps.EmptyMap copy()
Long2LongMapcopy in interface Long2LongMapcopy in class AbstractLong2LongMap