public class LocalizedString extends Localized<String>
LocalizedString
can represent a single value (non localized) or many values each mapping to a specific
Locale
Localized.Value<T extends Serializable>
Constructor and Description |
---|
LocalizedString(Locale locale,
String value)
Constructor to create a localized string.
|
LocalizedString(LocalizedString localizedString) |
LocalizedString(Map<Locale,String> valueMap)
Constructor to create a localized string with multiple values.
|
LocalizedString(String value)
Constructor to create a non localized string.
|
Modifier and Type | Method and Description |
---|---|
String |
getValue()
This method returns the value for a non localized string.
|
boolean |
isLocalized()
Indicates if the string is localized or not.
|
LocalizedString |
setLocalizedValue(Locale locale,
String value)
This method will first remove the non localized value if one exists then sets the value for the specified locale.
|
LocalizedString |
setValue(String value)
This will clear any localized values, and convert the string to a non localized string.
|
equals, getLocalizedValue, getLocalizedValues, getValue, hashCode, iterator, removeLocalizedValue, toString
public LocalizedString(LocalizedString localizedString)
public LocalizedString(String value)
Value
with a null
Locale
.value
- the value to represent the non localized stringpublic LocalizedString(Locale locale, String value)
locale
- the locale of the valuevalue
- the valuepublic String getValue()
Localized.getValue(java.util.Locale)
and passing in null for the Locale
public LocalizedString setValue(String value)
value
- the valuepublic LocalizedString setLocalizedValue(Locale locale, String value)
setLocalizedValue
in class Localized<String>
locale
- the localevalue
- the valuepublic boolean isLocalized()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.