public abstract class AbstractLong2LongMap extends java.util.AbstractMap<java.lang.Long,java.lang.Long> implements Long2LongMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractLong2LongMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Long2LongMap.Entry, Long2LongMap.FastEntrySet| Constructor and Description |
|---|
AbstractLong2LongMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Long2LongMap m)
A Helper method to bulk add primitives together.
|
long |
computeLong(long key,
LongLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(long key,
Long2LongFunction 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
|
boolean |
containsKey(long key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(long value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Long>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(LongLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key) |
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getOrDefault(long key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue) |
int |
hashCode() |
LongSet |
keySet() |
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
|
void |
putAll(long[] keys,
long[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Long2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Long> m) |
void |
putAllIfAbsent(Long2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
long |
replace(long key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(long key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceLongs(Long2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(LongLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractLong2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
LongCollection |
values() |
clear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddTo, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getLong, long2LongEntrySet, merge, put, put, putAll, putIfAbsent, putIfAbsent, remLong, remLongOrDefault, remove, remove, remove, replace, replace, replaceAllapplyAsLongpublic long getDefaultReturnValue()
Long2LongMapgetDefaultReturnValue in interface Long2LongMappublic AbstractLong2LongMap setDefaultReturnValue(long v)
Long2LongMapsetDefaultReturnValue in interface Long2LongMapv - value that should be the default return valuepublic void addToAll(Long2LongMap m)
Long2LongMapaddToAll in interface Long2LongMapm - the values that should be added/insertedpublic void putAll(Long2LongMap m)
Long2LongMapputAll in interface Long2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Long,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Long,java.lang.Long>putAll in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public void putAll(long[] keys,
long[] values,
int offset,
int size)
Long2LongMapputAll in interface Long2LongMapkeys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public void putAllIfAbsent(Long2LongMap m)
Long2LongMapputAllIfAbsent in interface Long2LongMapm - elements that should be added if not present.public boolean containsKey(long key)
Long2LongMapcontainsKey in interface Long2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Long2LongMapcontainsValue in interface Long2LongMapvalue - element that is searched forpublic boolean replace(long key,
long oldValue,
long newValue)
Long2LongMapreplace in interface Long2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(long key,
long value)
Long2LongMapreplace in interface Long2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Long2LongMap m)
Long2LongMapreplaceLongs in interface Long2LongMapm - elements that should be replaced.public void replaceLongs(LongLongUnaryOperator mappingFunction)
Long2LongMapreplaceLongs in interface Long2LongMapmappingFunction - operation to replace all valuespublic long computeLong(long key,
LongLongUnaryOperator mappingFunction)
Long2LongMapcomputeLong in interface Long2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(long key,
Long2LongFunction mappingFunction)
Long2LongMapcomputeLongIfAbsent in interface Long2LongMapkey - 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 Long2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(long key,
long value,
LongLongUnaryOperator mappingFunction)
Long2LongMapmergeLong in interface Long2LongMapkey - 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 Long2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Long,java.lang.Long>get in interface Long2LongMapget in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Long,java.lang.Long>getOrDefault in interface Long2LongMappublic long getOrDefault(long key,
long defaultValue)
Long2LongMapgetOrDefault in interface Long2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(LongLongConsumer action)
Long2LongMapforEach in interface Long2LongMapaction - processor of the values that are iterator overpublic LongSet keySet()
keySet in interface java.util.Map<java.lang.Long,java.lang.Long>keySet in interface Long2LongMapkeySet in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public LongCollection values()
values in interface java.util.Map<java.lang.Long,java.lang.Long>values in interface Long2LongMapvalues in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public ObjectSet<java.util.Map.Entry<java.lang.Long,java.lang.Long>> entrySet()
entrySet in interface java.util.Map<java.lang.Long,java.lang.Long>entrySet in interface Long2LongMapentrySet in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Long,java.lang.Long>equals in class java.util.AbstractMap<java.lang.Long,java.lang.Long>public int hashCode()
hashCode in interface java.util.Map<java.lang.Long,java.lang.Long>hashCode in class java.util.AbstractMap<java.lang.Long,java.lang.Long>