Package pl.edu.icm.unity.types
Class I18nString
java.lang.Object
pl.edu.icm.unity.types.I18nString
String in several languages. Besides localized versions can store also a default value which is returned when there
is no version for the requested locale and default locale.
- Author:
- K. Benedyczak
-
Constructor Summary
ConstructorDescriptionI18nString
(String defaultValue) I18nString
(String locale, String value) I18nString
(String key, MessageSource msg, Object... args) LoadsI18nString
from all message bundles which are installed in the system. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllValues
(Map<String, String> values) void
clone()
boolean
static I18nString
fromJson
(com.fasterxml.jackson.databind.JsonNode json) getMap()
getValue
(MessageSource msg) getValueRaw
(String locale) int
hashCode()
boolean
boolean
isEmpty()
void
void
setDefaultValue
(String defaultValue) com.fasterxml.jackson.databind.JsonNode
toJson()
void
toProperties
(Properties properties, String prefix, MessageSource msg) toString()
-
Constructor Details
-
I18nString
public I18nString() -
I18nString
-
I18nString
-
I18nString
LoadsI18nString
from all message bundles which are installed in the system. The returned object has no default value set.
-
-
Method Details
-
fromJson
-
toJson
public com.fasterxml.jackson.databind.JsonNode toJson() -
getValue
-
getValue
-
getValue
-
getValueRaw
-
addValue
-
addAllValues
-
getMap
-
getDefaultLocaleValue
-
getDefaultValue
-
setDefaultValue
-
isEmpty
public boolean isEmpty() -
hasNonDefaultValue
public boolean hasNonDefaultValue() -
toString
-
clone
-
hashCode
public int hashCode() -
toProperties
-
replace
-
equals
-