Class ModelLocale
- java.lang.Object
-
- net.ssehub.easy.basics.modelManagement.ModelLocale
-
public class ModelLocale extends java.lang.ObjectProvides internationalization support, i.e., which locale is valid for loading models. Instances of this class cannot be created directly rather than being obtained fromModelManagement.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Localelocale
-
Constructor Summary
Constructors Constructor Description ModelLocale()Prevents object creation from outside this package.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.util.LocalegetActualLocale()Returns the actual locale.java.util.LocalegetLocale()Returns the preferredlocalefor descriptive texts.voidsetLocale(java.util.Locale locale)Defines the preferredlocalefor descriptive texts.
-
-
-
Method Detail
-
setLocale
public void setLocale(java.util.Locale locale)
Defines the preferredlocalefor descriptive texts.- Parameters:
locale- the preferred locale, may be null
-
getLocale
public java.util.Locale getLocale()
Returns the preferredlocalefor descriptive texts.- Returns:
- the preferred locale as defined previously via
setLocale(Locale), may be null, in particular whensetLocale(Locale)has not been called before
-
getActualLocale
java.util.Locale getActualLocale()
Returns the actual locale.- Returns:
- the preferred locale if defined, the default system locale else
-
-