Interface LocalizedString
public interface LocalizedString
JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.
Example to create an instance using the builder pattern
LocalizedString localizedString = LocalizedString.builder()
./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalizedStringBuilderbuilder()builder factory method for LocalizedStringstatic LocalizedStringBuilderbuilder(LocalizedString template) create builder for LocalizedString instancecopyDeep()static LocalizedStringdeepCopy(LocalizedString template) factory method to create a deep copy of LocalizedStringstatic LocalizedStringof()factory methodstatic LocalizedStringof(LocalizedString template) factory method to create a shallow copy LocalizedStringvoidString used for the specified language.static com.fasterxml.jackson.core.type.TypeReference<LocalizedString>gives a TypeReference for usage with Jackson DataBindvalues()String used for the specified language.default <T> TwithLocalizedString(Function<LocalizedString, T> helper) accessor map function
-
Method Details
-
values
String used for the specified language.
- Returns:
- map of the pattern property values
-
setValue
String used for the specified language.
- Parameters:
key- property namevalue- property value
-
of
factory method- Returns:
- instance of LocalizedString
-
of
factory method to create a shallow copy LocalizedString- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
LocalizedString copyDeep() -
deepCopy
factory method to create a deep copy of LocalizedString- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for LocalizedString- Returns:
- builder
-
builder
create builder for LocalizedString instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withLocalizedString
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-