public static class Long2IntMaps.EmptyMap extends AbstractLong2IntMap
AbstractLong2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2IntMap.BuilderCache, Long2IntMap.Entry, Long2IntMap.FastEntrySet, Long2IntMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
int |
addTo(long key,
int value)
A Helper method to add a primitives together.
|
int |
computeInt(long key,
LongIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(long key,
Long2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(long key,
LongIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Long2IntMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
int |
get(long key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(long key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
LongSet |
keySet() |
ObjectSet<Long2IntMap.Entry> |
long2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
mergeAllInt(Long2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(long key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
int |
put(long key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(long key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(long key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(long key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(long key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
subFrom(long key,
int value)
A Helper method to subtract from primitive from each other.
|
int |
supplyIntIfAbsent(long key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
IntCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceInts, replaceInts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsInt, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic int put(long key,
int value)
Long2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(long key,
int value)
Long2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(long key,
int value)
Long2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(long key,
int value)
Long2IntMapLong2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic int remove(long key)
Long2IntMapkey - the element that should be removedpublic int removeOrDefault(long key,
int defaultValue)
Long2IntMapkey - 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,
int value)
Long2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int get(long key)
Long2IntMapkey - the key that is searched forpublic int getOrDefault(long key,
int defaultValue)
Long2IntMapgetOrDefault in interface Long2IntMapgetOrDefault in class AbstractLong2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int computeInt(long key,
LongIntUnaryOperator mappingFunction)
Long2IntMapcomputeInt in interface Long2IntMapcomputeInt in class AbstractLong2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(long key,
Long2IntFunction mappingFunction)
Long2IntMapcomputeIntIfAbsent in interface Long2IntMapcomputeIntIfAbsent in class AbstractLong2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int computeIntIfPresent(long key,
LongIntUnaryOperator mappingFunction)
Long2IntMapcomputeIntIfPresent in interface Long2IntMapcomputeIntIfPresent in class AbstractLong2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int supplyIntIfAbsent(long key,
IntSupplier valueProvider)
Long2IntMapsupplyIntIfAbsent in interface Long2IntMapsupplyIntIfAbsent in class AbstractLong2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int mergeInt(long key,
int value,
IntIntUnaryOperator mappingFunction)
Long2IntMapmergeInt in interface Long2IntMapmergeInt in class AbstractLong2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Long2IntMap m, IntIntUnaryOperator mappingFunction)
Long2IntMapmergeAllInt in interface Long2IntMapmergeAllInt in class AbstractLong2IntMapm - 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.Integer>keySet in interface Long2IntMapkeySet in class AbstractLong2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Integer>values in interface Long2IntMapvalues in class AbstractLong2IntMappublic ObjectSet<Long2IntMap.Entry> long2IntEntrySet()
Long2IntMappublic Long2IntMaps.EmptyMap copy()
Long2IntMapcopy in interface Long2IntMapcopy in class AbstractLong2IntMap