K - the key type.V - the value type.public final class MiniMap<K,V> extends Object implements Composition
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 and Description |
|---|
MiniMap() |
MiniMap(int initialCapacity) |
MiniMap(int initialCapacity,
KeyValue<? extends K,? extends V>... data) |
| Modifier and Type | Method and 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() |
@SafeVarargs public static final <K,V> MiniMap<K,V> miniMap(KeyValue<? extends K,? extends V>... data)
public int size()
public ConstMiniMap<K,V> toConstMap()
public boolean containsKey(K key)
public void optimize()
public void clear()
Copyright © 2022 MicroStream Software. All rights reserved.