Package one.microstream.collections
Class MiniMap<K,V>
- java.lang.Object
-
- one.microstream.collections.MiniMap<K,V>
-
- Type Parameters:
K
- the key type.V
- the value type.
- All Implemented Interfaces:
Composition
public final class MiniMap<K,V> extends Object implements Composition
Straight forward minimal implementation of a strongly referencing identity hashing map.This implementation is preferable to full scale implementations like
HashEnum
orEqHashEnum
in cases where only basic mapping functionality but best performance and low memory need is required, for example to associate handler instances to class instances.
-
-
Method Summary
Modifier and Type Method Description void
clear()
boolean
containsKey(K key)
MiniMap<K,V>
copy()
V
get(K key)
int
iterateValues(Consumer<? super V> procedure)
static <K,V>
MiniMap<K,V>miniMap(KeyValue<? extends K,? extends V>... data)
void
optimize()
V
put(K key, V value)
MiniMap<K,V>
putAll(KeyValue<K,V>... data)
V
remove(K key)
int
size()
KeyValue<K,V>[]
toArray()
ConstMiniMap<K,V>
toConstMap()
-
-
-
Method Detail
-
miniMap
@SafeVarargs public static final <K,V> MiniMap<K,V> miniMap(KeyValue<? extends K,? extends V>... data)
-
size
public int size()
-
toConstMap
public ConstMiniMap<K,V> toConstMap()
-
containsKey
public boolean containsKey(K key)
-
optimize
public void optimize()
-
clear
public void clear()
-
-