Package org.geotools.jdbc
Class EnumMapping
Object
EnumMapping
Helper class for enums.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(String key, String value) Adds a key/value mappingRetrieves the value associated with the given key.Retrieves the key associated with the given value.Retrieves the key associated with the given value.Returns an unmodifiable view of the key-to-value mappings.Returns an unmodifiable view of the value-to-key mappings.
-
Constructor Details
-
EnumMapping
public EnumMapping()
-
-
Method Details
-
addMapping
Adds a key/value mapping -
fromKey
Retrieves the value associated with the given key.- Parameters:
key- the key to look up- Returns:
- the value mapped to the given key, or
nullif no mapping exists
-
fromValue
Retrieves the key associated with the given value.- Parameters:
value- the value to look up- Returns:
- the key mapped to the given value, or
nullif no mapping exists
-
fromValue
Retrieves the key associated with the given value.- Parameters:
value- the value to look upmatchCase-trueto perform a case-sensitive lookup,falseotherwise- Returns:
- the key mapped to the given value, or
nullif no mapping exists
-
keyToValueMap
Returns an unmodifiable view of the key-to-value mappings.- Returns:
- an unmodifiable
Mapcontaining the key-to-value mappings
-
valueToKeyMap
Returns an unmodifiable view of the value-to-key mappings.- Returns:
- an unmodifiable
Mapcontaining the value-to-key mappings
-