Class LexiconManager

    • Method Detail

      • clear

        public static void clear()
        Clears all loaded lexicons.
      • getLexicon

        public static Lexicon getLexicon​(String name,
                                         @NonNull
                                         @NonNull Language language)
        Gets the lexicon with the given name for the given Language
        Parameters:
        name - the name of the lexicon
        language - the language of the lexicon
        Returns:
        the lexicon
      • getLexicon

        public static Lexicon getLexicon​(String name)
        Gets the lexicon of the given name for the default language as defined in Hermes.defaultLanguage().
        Parameters:
        name - the name of the lexicon
        Returns:
        the lexicon
      • register

        public static void register​(String name,
                                    @NonNull
                                    @NonNull Lexicon lexicon)
        Registers a lexicon with a given name for the default language as defined in Hermes.defaultLanguage().
        Parameters:
        name - the name
        lexicon - the lexicon
      • register

        public static void register​(String name,
                                    @NonNull
                                    @NonNull Language language,
                                    @NonNull
                                    @NonNull Lexicon lexicon)
        Registers a lexicon with the given name for the given language
        Parameters:
        name - the name
        language - the language
        lexicon - the lexicon
      • remove

        public static void remove​(String name)
        Removes the lexicon with the given name for the default language as defined in Hermes.defaultLanguage().
        Parameters:
        name - the name
      • remove

        public static void remove​(String name,
                                  @NonNull
                                  @NonNull Language language)
        Removes the lexicon with the given name for the given language
        Parameters:
        name - the name
        language - the language