K
- the type of keysV
- the type of valuespublic interface MapGenotype<K,V>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ERROR_MESSAGE_INVALID_KEY |
static java.lang.String |
ERROR_MESSAGE_NON_UNIQUE_KEYS |
static java.lang.String |
ERROR_MESSAGE_OUT_OF_BOUNDS |
static java.lang.String |
ERROR_MESSAGE_UNSUPPORTED_INIT |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(K key)
Returns
true if the key is contained. |
int |
getIndexOf(K key)
Returns the index of the key.
|
java.util.Collection<K> |
getKeys()
Return all keys.
|
V |
getValue(K key)
Returns the value for the specified key.
|
void |
setValue(K key,
V value)
Sets the value for the specified key.
|
static final java.lang.String ERROR_MESSAGE_NON_UNIQUE_KEYS
static final java.lang.String ERROR_MESSAGE_INVALID_KEY
static final java.lang.String ERROR_MESSAGE_OUT_OF_BOUNDS
static final java.lang.String ERROR_MESSAGE_UNSUPPORTED_INIT
java.util.Collection<K> getKeys()
V getValue(K key)
key
- the keysetValue(K, V)
void setValue(K key, V value)
key
- the keyvalue
- the valuegetValue(K)
boolean containsKey(K key)
true
if the key is contained.key
- the keytrue
if the key is containedint getIndexOf(K key)
key
- the key