Class ModelLocale

java.lang.Object
net.ssehub.easy.basics.modelManagement.ModelLocale

public class ModelLocale extends Object
Provides internationalization support, i.e., which locale is valid for loading models. Instances of this class cannot be created directly rather than being obtained from ModelManagement.
Author:
Holger Eichelberger
  • Field Details

    • locale

      private Locale locale
  • Constructor Details

    • ModelLocale

      ModelLocale()
      Prevents object creation from outside this package.
  • Method Details

    • setLocale

      public void setLocale(Locale locale)
      Defines the preferred locale for descriptive texts.
      Parameters:
      locale - the preferred locale, may be null
    • getLocale

      public Locale getLocale()
      Returns the preferred locale for descriptive texts.
      Returns:
      the preferred locale as defined previously via setLocale(Locale), may be null, in particular when setLocale(Locale) has not been called before
    • getActualLocale

      Locale getActualLocale()
      Returns the actual locale.
      Returns:
      the preferred locale if defined, the default system locale else