public abstract class Localized<T extends Serializable> extends Object implements Iterable<T>, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Localized.Value<T extends Serializable>
Value object representing the mapping of a Locale to a value of type T.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Localized(Locale locale,
T value) |
protected |
Localized(Localized<T> localized) |
protected |
Localized(Map<Locale,T> valueMap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Localized.Value<T> |
getLocalizedValue(Locale locale)
Gets the value mapped to the specific locale.
|
Collection<Localized.Value<T>> |
getLocalizedValues()
Returns a collection of values representing the mapping of Locale to type T
|
T |
getValue(Locale locale)
Gets the T value mapped to the specific locale.
|
int |
hashCode() |
Iterator<T> |
iterator() |
void |
removeLocalizedValue(Locale locale)
Will remove the value mapped to the locale.
|
Localized<T> |
setLocalizedValue(Locale locale,
T value)
Sets the value for the specified locale.
|
String |
toString() |
public Localized.Value<T> getLocalizedValue(Locale locale)
locale - the locale of the valuepublic T getValue(Locale locale)
getLocalizedValue(Locale).getValue()locale - the locale of the valuepublic Localized<T> setLocalizedValue(Locale locale, T value)
locale - the localevalue - the valuepublic void removeLocalizedValue(Locale locale)
locale - the localepublic Collection<Localized.Value<T>> getLocalizedValues()
public Iterator<T> iterator()
iterator in interface Iterable<T extends Serializable>Copyright © 2013 JBoss by Red Hat. All Rights Reserved.