Class MinimalSubstitutionMap

java.lang.Object
com.google.common.css.MinimalSubstitutionMap
All Implemented Interfaces:
SubstitutionMap, SubstitutionMap.Initializable

public class MinimalSubstitutionMap extends Object implements SubstitutionMap.Initializable
MinimalSubstitutionMap is a SubstitutionMap that renames CSS classes to the shortest string possible.
  • Constructor Details

    • MinimalSubstitutionMap

      public MinimalSubstitutionMap()
    • MinimalSubstitutionMap

      public MinimalSubstitutionMap(Set<String> outputValueBlacklist)
      Parameters:
      outputValueBlacklist - A set of CSS class names that may not be returned as the output from a substitution lookup.
  • Method Details

    • get

      public String get(String key)
      Gets the string that should be substituted for key. The same value must be consistently returned for any particular key, and the returned value must not be returned for any other key value.
      Specified by:
      get in interface SubstitutionMap
      Parameters:
      key - the text to be replaced (never null)
      Returns:
      the value to substitute for key
    • initializeWithMappings

      public void initializeWithMappings(Map<String,String> m)
      Specified by:
      initializeWithMappings in interface SubstitutionMap.Initializable