Package nz.org.riskscape.engine.i18n
Class EnumTranslator.EnumEntry<T extends Enum<?>>
java.lang.Object
nz.org.riskscape.engine.i18n.EnumTranslator.EnumEntry<T>
- Enclosing class:
- EnumTranslator
Handles accessing translated strings for a specific enum value
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getCode()
getDescription
(Object... args) Returns a translated 'label' string for this enum.getLabelOr
(String defaultMessage, Object... args) Same asgetLabel(Object...)
except thedefaultMessage
will be used (rather than theEnum.name()
if no i18n message was found.getValue()
The enum value itselfint
hashCode()
toString()
-
Constructor Details
-
EnumEntry
-
-
Method Details
-
getLabel
Returns a translated 'label' string for this enum. If no i18n message was found, then the
Enum.name()
is used (changed to lower-case hyphens, so it looks more parameter-esque). -
getLabelOr
Same as
getLabel(Object...)
except thedefaultMessage
will be used (rather than theEnum.name()
if no i18n message was found. -
getCode
- Returns:
- the base i18n code for this enum value
-
getDescription
- Returns:
- a more detailed description for the enum value, e.g. help associated with what it is or does.
-
getValue
The enum value itself
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-