Interface MultipleMappingSubstitutionMap
-
- All Superinterfaces:
SubstitutionMap
- All Known Implementing Classes:
PrefixingSubstitutionMap,SplittingSubstitutionMap
public interface MultipleMappingSubstitutionMap extends SubstitutionMap
MultipleMappingSubstitutionMapis a special type ofSubstitutionMapthat can create multiple mappings for a single lookup. This is particularly important with respect to CSS renaming.For example, a
SplittingSubstitutionMapmay rename "goog-component" as "a-b", in which case it has created two renaming mappings: "a" -> "goog" and "b" -> "component", both of which are necessary to produce the full renaming map.Note that in the case of
SplittingSubstitutionMap, the map that is returned bygetValueWithMappings(String)does not contain "goog-component" as a key because the entries "goog" and "component" are sufficient to construct the renamed version of "goog-component". Therefore, the key passed intogetValueWithMappings(String)is not guaranteed to appear in the output.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMultipleMappingSubstitutionMap.ValueWithMappingsContains both the value and mappings returned bygetValueWithMappings(String).-
Nested classes/interfaces inherited from interface com.google.common.css.SubstitutionMap
SubstitutionMap.Initializable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MultipleMappingSubstitutionMap.ValueWithMappingsgetValueWithMappings(java.lang.String key)Like an ordinarySubstitutionMap, this returns a value to substitute for the specifiedkey.-
Methods inherited from interface com.google.common.css.SubstitutionMap
get
-
-
-
-
Method Detail
-
getValueWithMappings
MultipleMappingSubstitutionMap.ValueWithMappings getValueWithMappings(java.lang.String key)
Like an ordinarySubstitutionMap, this returns a value to substitute for the specifiedkey. This value is available asMultipleMappingSubstitutionMap.ValueWithMappings.value.Additionally, it also returns any renaming mappings that should be associated with this substitution. These mappings are available as
MultipleMappingSubstitutionMap.ValueWithMappings.mappings.
-
-