K
-V
-public interface PgxMap<K,V>
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all key-value pairs from the map.
|
boolean |
containsKey(K key)
Check if the map contains the given key.
|
static <K,V> PgxMap<K,V> |
create()
Instantiate a new map.
|
void |
decrement(K key)
Decrement the value at the given key.
|
V |
get(K key)
Get the value for the given key.
|
K |
getKeyForMaxValue()
Get the key for the largest value in the map.
|
K |
getKeyForMinValue()
Get the key for the smallest value in the map.
|
V |
getMaxValue()
Returns the largest value in the map.
|
V |
getMinValue()
Returns the smallest value in the map.
|
boolean |
hasMaxValue(K key)
Check if the given key is mapped to the largest value in the map.
|
boolean |
hasMinValue(K key)
Check if the given key is mapped to the smallest value in the map.
|
void |
increment(K key)
Increment the value at the given key.
|
PgxCollection<K> |
keys()
Get the keys in this map.
|
void |
reduceAdd(K key, V value)
Atomically update the value for the given key to the sum of the current value and the given value.
|
void |
reduceAnd(K key, V value)
Atomically update the value for the given key to the conjunction of the current value and the given value.
|
void |
reduceMax(K key, V value)
Atomically update the value for the given key to the maximum of the current value and the given value..
|
void |
reduceMin(K key, V value)
Atomically update the value for the given key to the minimum of the current value and the given value..
|
void |
reduceMul(K key, V value)
Atomically update the value for the given key to the multiplication of the current value and the given value.
|
void |
reduceOr(K key, V value)
Atomically update the value for the given key to the disjunction of the current value and the given value.
|
void |
remove(K key)
Remove the value for the given key from the map.
|
void |
set(K key, V value)
Put a value for the given key in the map.
|
long |
size()
Get the number of elements in the map.
|
PgxCollection<V> |
values()
Get the values in this map.
|
void clear()
boolean containsKey(K key)
static <K,V> PgxMap<K,V> create()
void decrement(K key)
key
-K getKeyForMaxValue()
K getKeyForMinValue()
V getMaxValue()
V getMinValue()
boolean hasMaxValue(K key)
key
-boolean hasMinValue(K key)
key
-void increment(K key)
key
-PgxCollection<K> keys()
void reduceAdd(K key, V value)
key
-value
-void reduceAnd(K key, V value)
key
-value
-void reduceMax(K key, V value)
key
-value
-void reduceMin(K key, V value)
key
-value
-void reduceMul(K key, V value)
key
-value
-void reduceOr(K key, V value)
key
-value
-void remove(K key)
key
-long size()
PgxCollection<V> values()