Class ModelLocale


  • public class ModelLocale
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Locale locale  
    • 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.Locale getActualLocale()
      Returns the actual locale.
      java.util.Locale getLocale()
      Returns the preferred locale for descriptive texts.
      void setLocale​(java.util.Locale locale)
      Defines the preferred locale for descriptive texts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • locale

        private java.util.Locale locale
    • Constructor Detail

      • ModelLocale

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

      • setLocale

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

        public java.util.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

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