public class ValueReferenceMap<K,V>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ValueReferenceMap.Type |
| Constructor and Description |
|---|
ValueReferenceMap(java.util.function.Function<K,V> creator,
ValueReferenceMap.Type type) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all entries from the map
|
V |
get(K key)
Get the value for a given key.
|
boolean |
remove(K key)
Remove an entry from the map
|
int |
size()
Get map size
|
public ValueReferenceMap(java.util.function.Function<K,V> creator, ValueReferenceMap.Type type)
creator - a function that creates the value object for
a given key in the maptype - the type of reference: Weak or Softpublic V get(K key)
key - the key for the required value. Must not be null.public boolean remove(K key)
key - the key for the entrypublic void clear()
public int size()