Package org.geotools.jdbc
Class EnumMapping
Object
EnumMapping
Helper class for enums.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(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
null
if 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
null
if no mapping exists
-
fromValue
Retrieves the key associated with the given value.- Parameters:
value
- the value to look upmatchCase
-true
to perform a case-sensitive lookup,false
otherwise- Returns:
- the key mapped to the given value, or
null
if no mapping exists
-
keyToValueMap
Returns an unmodifiable view of the key-to-value mappings.- Returns:
- an unmodifiable
Map
containing the key-to-value mappings
-
valueToKeyMap
Returns an unmodifiable view of the value-to-key mappings.- Returns:
- an unmodifiable
Map
containing the value-to-key mappings
-