Interface MultipleMappingSubstitutionMap
- All Superinterfaces:
SubstitutionMap
- All Known Implementing Classes:
PrefixingSubstitutionMap,SplittingSubstitutionMap
MultipleMappingSubstitutionMap is a special type of
SubstitutionMap that can create multiple mappings for a single
lookup. This is particularly important with respect to CSS renaming.
For example, a SplittingSubstitutionMap may 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 by getValueWithMappings(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 into getValueWithMappings(String) is not guaranteed
to appear in the output.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classContains both the value and mappings returned bygetValueWithMappings(String).Nested classes/interfaces inherited from interface com.google.common.css.SubstitutionMap
SubstitutionMap.Initializable -
Method Summary
Modifier and TypeMethodDescriptionLike an ordinarySubstitutionMap, this returns a value to substitute for the specifiedkey.Methods inherited from interface com.google.common.css.SubstitutionMap
get
-
Method Details
-
getValueWithMappings
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.
-