public class AppLocale extends BaseMapOptionData<AppLocale>
| Constructor and Description |
|---|
AppLocale() |
AppLocale(java.util.Map<java.lang.String,java.lang.Object> options) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.String> |
getCountry()
Get the country identifier.
|
java.util.Optional<java.lang.String> |
getLanguage()
Get the language identifier.
|
java.util.Optional<java.lang.String> |
getVariant()
Get the language variant.
|
AppLocale |
withCountry(java.lang.String country)
Allows to set a country identifier.
|
AppLocale |
withLanguage(java.lang.String lang)
Language identifier.
|
AppLocale |
withVariant(java.lang.String variant)
Allows to set an optional language variant value.
|
assignOptionValue, getOptionValue, toJson, toMap, toStringpublic AppLocale()
public AppLocale(java.util.Map<java.lang.String,java.lang.Object> options)
public AppLocale withLanguage(java.lang.String lang)
lang - Language identifier, for example "zh".public java.util.Optional<java.lang.String> getLanguage()
public AppLocale withCountry(java.lang.String country)
country - Country identifier, for example "CN".public java.util.Optional<java.lang.String> getCountry()
public AppLocale withVariant(java.lang.String variant)
variant - Language variant, for example "Hans".public java.util.Optional<java.lang.String> getVariant()