Package de.xima.fc.mdl.enums
Enum EI18nSource
- All Implemented Interfaces:
INamedUiElement
,Serializable
,Comparable<EI18nSource>
Given a default string and a language-specific string, indicates which string should be used. For example, we could
always use the default string; or use the language-specific string and fall back to the default if none is found.
- Author:
- XIMA MEDIA GmbH
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse the language-specific string if one exists, otherwise fall back to the default string.Never use a string for a particular language, always use the empty string.Do not use a language-specific string, always use the default. -
Field Summary
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Method Summary
Modifier and TypeMethodDescriptiongetDisplayName
(Locale locale) boolean
abstract String
Given a default string and a language-specific string, return the string that should actually be used, according to this setting.static EI18nSource
Returns the enum constant of this type with the specified name.static EI18nSource[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
USE_DEFAULT
Do not use a language-specific string, always use the default. -
CUSTOM_OR_DEFAULT
Use the language-specific string if one exists, otherwise fall back to the default string. -
DISABLE
Never use a string for a particular language, always use the empty string.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
- Specified by:
getDisplayName
in interfaceINamedUiElement
- Returns:
- Wert, der das entsprechende Objekt an Oberfläche repräsentiert (wird i.A. zur Laufzeit ermittelt).
-
isAvailable
public boolean isAvailable()- Returns:
- Whether a string is availble for this setting at all. It is
false
forDISABLE
.
-
resolve
Given a default string and a language-specific string, return the string that should actually be used, according to this setting.- Parameters:
defaultValue
- The default string.i18nValue
- The language-specific string.- Returns:
- The resolved string, depending on this setting. Never returns
null
, only the empty string.
-