Class LocalizedString
java.lang.Object
com.inductiveautomation.ignition.common.i18n.LocalizedString
- All Implemented Interfaces:
Localized
,Serializable
,Comparable<LocalizedString>
public class LocalizedString
extends Object
implements Localized, Serializable, Comparable<LocalizedString>
A special string container that holds a key, and returns the localized version of that key on toString(). At the time
of creation, however, it stores the value of the key in the default locale, and returns that value should the key not
be available later. This makes it possible to serialize and send this class to different scopes, where the key may or
may not be available when it comes time to use it.
NOTE: In cases where a LocalizedString object is required, but the value isn't actually localizable, you can use the static createRaw() function.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJavaBean compatibility...LocalizedString
(String key, Object... params) LocalizedString
(Locale defaultLocale, String key, Object... params) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(LocalizedString other) static LocalizedString
Creates a localized string not based on a key.getKey()
Object[]
void
setDefaultVal
(String defaultVal) void
void
toString()
-
Constructor Details
-
LocalizedString
public LocalizedString()JavaBean compatibility... -
LocalizedString
-
LocalizedString
-
-
Method Details
-
createRaw
Creates a localized string not based on a key. -
getKey
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<LocalizedString>
-
toString
-
getDefaultVal
-
setDefaultVal
-
getParams
-
setParams
-
setKey
-