Package org.opt4j.genotype
Interface MapGenotype<K,V>
- Type Parameters:
K
- the type of keysV
- the type of values
- All Known Implementing Classes:
BooleanMapGenotype
,DoubleMapGenotype
,IntegerMapGenotype
,SelectMapGenotype
public interface MapGenotype<K,V>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(K key) Returnstrue
if the key is contained.int
getIndexOf
(K key) Returns the index of the key.getKeys()
Return all keys.Returns the value for the specified key.void
Sets the value for the specified key.
-
Method Details
-
getKeys
Collection<K> getKeys()Return all keys.- Returns:
- all keys
-
getValue
Returns the value for the specified key.- Parameters:
key
- the key- Returns:
- the value
- See Also:
-
setValue
Sets the value for the specified key.- Parameters:
key
- the keyvalue
- the value- See Also:
-
containsKey
Returnstrue
if the key is contained.- Parameters:
key
- the key- Returns:
true
if the key is contained
-
getIndexOf
Returns the index of the key.- Parameters:
key
- the key- Returns:
- the index
-