K - key classV - value classpublic class Container<K,V> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Container.Mode
the mode
|
| Constructor and Description |
|---|
Container(Logger logger)
Builds a default container
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(K key,
V value)
If mode is update, then the key must exist.
|
void |
debug()
Set the debug mode: every add will be stored
|
void |
freeze()
Freeze the container: no new key-value pair is accepted.
|
V |
get(K key) |
Map<K,V> |
getValueByKey() |
Iterable<V> |
getValues() |
void |
setMode(Container.Mode mode)
Set the new mode to use
|
public Container(Logger logger)
logger - the loggerpublic void setMode(Container.Mode mode)
mode - the mode (CREATE, UPDATE, CREATE_OR_UPDATE)public boolean add(K key, V value)
key - the keyvalue - the valuepublic void debug()
public void freeze()
Copyright © 2016–2021. All rights reserved.