Package dev.orne.i18n.context
Class DefaultI18nContext
java.lang.Object
dev.orne.i18n.context.DefaultI18nContext
- All Implemented Interfaces:
I18nContext
,Serializable
@API(status=STABLE,
since="0.1")
public class DefaultI18nContext
extends Object
implements I18nContext, Serializable
Default implementation of
I18nContext
.- Since:
- 0.1
- Version:
- 1.0, 2021-01
- Author:
- (w) Iker Hernaez
- See Also:
-
Constructor Summary
ConstructorDescriptionDefaultI18nContext
(@NotNull DefaultI18nContext copy) Copy constructor.DefaultI18nContext
(@NotNull UUID providerUUID) Creates a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.orne.i18n.context.I18nContext
getAvailableLocales, getI18nResources, getI18nResources
-
Constructor Details
-
DefaultI18nContext
Creates a new instance.- Parameters:
providerUUID
- The UUID of the provider owner of this context
-
DefaultI18nContext
Copy constructor.- Parameters:
copy
- The instance to copy
-
-
Method Details
-
getProviderUUID
Returns the UUID of the provider owner of this context.- Specified by:
getProviderUUID
in interfaceI18nContext
- Returns:
- The UUID of the provider owner of this context
-
getLocale
Returns the user's language.- Specified by:
getLocale
in interfaceI18nContext
- Returns:
- The user's language
-
setLocale
Sets the user's language. If the argument isnull
the JVM default language is set.- Specified by:
setLocale
in interfaceI18nContext
- Parameters:
locale
- The user's language to set
-
hashCode
public int hashCode() -
equals
-
toString
-