public abstract class AbstractLongMap<V> extends AbstractMap<Long,V> implements LongMap<V>
LongMap
interface, to minimize the effort required to implement this interface.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
LongMap.Entry<V>
Constructor and Description |
---|
AbstractLongMap() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear() |
V |
compute(Long key,
BiFunction<? super Long,? super V,? extends V> remappingFunction) |
V |
computeIfAbsent(Long key,
Function<? super Long,? extends V> mappingFunction) |
V |
computeIfPresent(Long key,
BiFunction<? super Long,? super V,? extends V> remappingFunction) |
abstract boolean |
containsKey(long key)
Returns true if this map contains a mapping for the specified
key.
|
boolean |
containsKey(Object key) |
abstract Set<Map.Entry<Long,V>> |
entrySet() |
abstract V |
get(long key)
Returns the value to which this map maps the specified key.
|
V |
get(Object key) |
V |
getOrDefault(Object key,
V defaultValue) |
Set<Long> |
keySet()
Returns the same value as
longKeySet() method does. |
abstract LongSet |
longKeySet()
Returns a set view of the keys contained in this map.
|
V |
merge(Long key,
V value,
BiFunction<? super V,? super V,? extends V> remappingFunction) |
abstract V |
put(long key,
V value)
Associates the specified value with the specified key in this map.
|
V |
put(Long key,
V value) |
V |
putIfAbsent(Long key,
V value) |
abstract V |
remove(long key)
Removes the mapping for this key from this map if present.
|
V |
remove(Object key) |
boolean |
remove(Object key,
Object value) |
V |
replace(Long key,
V value) |
boolean |
replace(Long key,
V oldValue,
V newValue) |
abstract int |
size() |
abstract Collection<V> |
values() |
clone, containsValue, equals, hashCode, isEmpty, putAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, getOrDefault, merge, putIfAbsent, remove, replace, replace
containsValue, equals, forEach, hashCode, isEmpty, putAll, replaceAll
public abstract int size()
public abstract void clear()
public abstract boolean containsKey(long key)
LongMap
containsKey
in interface LongMap<V>
Map.containsKey(Object)
public abstract V get(long key)
LongMap
get
in interface LongMap<V>
Map.get(Object)
public abstract V put(long key, V value)
LongMap
put
in interface LongMap<V>
Map.put(Object, Object)
public abstract V remove(long key)
LongMap
remove
in interface LongMap<V>
Map.remove(Object)
public abstract LongSet longKeySet()
LongMap
longKeySet
in interface LongMap<V>
Map.keySet()
public abstract Collection<V> values()
public final boolean containsKey(Object key)
containsKey
in interface Map<Long,V>
containsKey
in class AbstractMap<Long,V>
public final V getOrDefault(Object key, V defaultValue)
getOrDefault
in interface Map<Long,V>
public final V putIfAbsent(Long key, V value)
putIfAbsent
in interface Map<Long,V>
public final V computeIfAbsent(Long key, Function<? super Long,? extends V> mappingFunction)
computeIfAbsent
in interface Map<Long,V>
public final V computeIfPresent(Long key, BiFunction<? super Long,? super V,? extends V> remappingFunction)
computeIfPresent
in interface Map<Long,V>
public final V compute(Long key, BiFunction<? super Long,? super V,? extends V> remappingFunction)
public final V merge(Long key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
Copyright © 2002–2025 Devexperts LLC. All rights reserved.