Class Translet._CAT<R>

java.lang.Object
eu.bandm.tscore.base.Translet.Parser<R>
eu.bandm.tscore.base.Translet._CAT<R>
Enclosing class:
Translet

public static class Translet._CAT<R> extends Translet.Parser<R>
Implements a greedy longest prefix match from a collection of strings. The returned value is either looked up in a map, or it is the string itself, if no map is provided.
  • Field Details

    • strings

      protected final List<String> strings
      List of names as input to the constructor.
    • sortedStrings

      protected final List<String> sortedStrings
      List of names sorted by increasing length ???? FIXME
    • results

      @Opt protected final @Opt Map<String,R> results
      Maps input strings to result objects. Iff ==null, then those are taken for these.
    • name

      protected Format name
      Pretty-printed name, similar to the call to a factory method.
  • Constructor Details

    • _CAT

      public _CAT(Map<String,R> results)
      Constructs a catalog parser with an explicit map of inputs texts to result objects.
    • _CAT

      public _CAT(String... s)
      Constructs a catalog parser with a list of inputs texts, which are directly the result.
    • _CAT

      public _CAT(List<String> s)
      Constructs a catalog parser with a list of inputs texts, which are directly the result.
  • Method Details