Class CatalogByString

java.lang.Object
eu.bandm.tools.muli.Catalog<String>
eu.bandm.tools.muli.CatalogByString
Direct Known Subclasses:
BatchOptions.Descriptions, CallXsltOptions.Descriptions, DocTexts, InsertOverprintOptions.Descriptions, JarLinkerOptions.Descriptions, JWhichOptions.Descriptions, Messages, Options.Descriptions, Options.Descriptions, Options.Descriptions, Options.Descriptions, Options.Descriptions, Options.Descriptions, Options.Descriptions, ParameterExpanderOptions.Descriptions, ToolOptions.Descriptions, Translations, Translations, Translations, Translations

public class CatalogByString extends Catalog<String>
An instantiation of Catalog with String as type parameter for the keys. This allows easy denotation and construction, and is the standard case for multi-lingual text interfaces.
  • Constructor Details

    • CatalogByString

      public CatalogByString()
      Only constructor
  • Method Details

    • getKeys

      public SortedSet<String> getKeys()
      Returns all key objects in this catalog.
      Overrides:
      getKeys in class Catalog<String>
      Returns:
      all key objects in an unmodifiable copy.
    • putAsKey

      public void putAsKey(String... pairs)
      Put translations in which the very first text is also the key. Calls Catalog.put(Object, List)
      Parameters:
      pairs - of language and value. The very first value (in the very first language) also serves as key.
    • _translateArgs

      protected List<Object> _translateArgs(List<String> pref, List<Object> args)
      Translation of arguments must NOT be done for Strings, but only for embedded PreMessage. This is done even recursively, including formatting.
      Overrides:
      _translateArgs in class Catalog<String>
      Parameters:
      pref - of languages. If list is empty, then a random result or "toString()" will be delivered.
      args - the arguments for formatting the top-level translation.
      Returns:
      the list of translated or untouched argments.