Package de.digitalcollections.model.text
Class LocalizedText
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Locale,
String>
LocalizedText is used for unformatted text content in multiple languages.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Constructor Details
-
LocalizedText
public LocalizedText() -
LocalizedText
-
-
Method Details
-
getLocales
- Returns:
- all locales for which translated texts are available.
-
getText
- Returns:
- first found text
-
getText
- Parameters:
locale
- the desired locale.- Returns:
- text with the given locale
-
has
-
setText
sets (means: "add" or "replace") a text with a given locale- Parameters:
locale
- the locale oftext
text
- the text content
-
builder
-
toString
- Overrides:
toString
in classAbstractMap<Locale,
String>
-