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
or EqHashEnum
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.
-
Constructor Summary
-
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()
-
Constructor Details
-
Method Details
-
miniMap
@SafeVarargs public static final <K, V> MiniMap<K,V> miniMap(KeyValue<? extends K,? extends V>... data) -
size
public int size() -
copy
-
toConstMap
-
get
-
containsKey
-
put
-
putAll
-
remove
-
optimize
public void optimize() -
clear
public void clear() -
toArray
-
iterateValues
-