Class StringLookupFactory.DefaultStringLookupsHolder

java.lang.Object
org.apache.commons.text.lookup.StringLookupFactory.DefaultStringLookupsHolder
Enclosing class:
StringLookupFactory

static final class StringLookupFactory.DefaultStringLookupsHolder extends Object
Internal class used to construct the default StringLookup map used by StringLookupFactory.addDefaultStringLookups(Map).
  • Field Details

  • Constructor Details

    • DefaultStringLookupsHolder

      DefaultStringLookupsHolder(Properties props)
      Construct a new instance initialized with the given properties.
      Parameters:
      props - initialization properties
  • Method Details

    • addLookup

      private static void addLookup(DefaultStringLookup lookup, Map<String,StringLookup> map)
      Add the key and string lookup from lookup to map, also adding any additional key aliases if needed. Keys are normalized using the StringLookupFactory.toKey(String) method.
      Parameters:
      lookup - lookup to add
      map - map to add to
    • createDefaultStringLookups

      private static Map<String,StringLookup> createDefaultStringLookups()
      Create the lookup map used when the user has requested no customization.
      Returns:
      default lookup map
    • parseStringLookups

      private static Map<String,StringLookup> parseStringLookups(String str)
      Construct a lookup map by parsing the given string. The string is expected to contain comma or space-separated names of values from the DefaultStringLookup enum. If the given string is null or empty, an empty map is returned.
      Parameters:
      str - string to parse; may be null or empty
      Returns:
      lookup map parsed from the given string
    • getDefaultStringLookups

      Map<String,StringLookup> getDefaultStringLookups()
      Get the default string lookups map.
      Returns:
      default string lookups map