Package com.google.common.css
Class SplittingSubstitutionMap
- java.lang.Object
-
- com.google.common.css.SplittingSubstitutionMap
-
- All Implemented Interfaces:
MultipleMappingSubstitutionMap,SubstitutionMap,SubstitutionMap.Initializable
public class SplittingSubstitutionMap extends java.lang.Object implements MultipleMappingSubstitutionMap, SubstitutionMap.Initializable
The CSS class substitution map which splits CSS class names on the "-" (dash) character and processes them separately using a delegate substitution map.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.common.css.MultipleMappingSubstitutionMap
MultipleMappingSubstitutionMap.ValueWithMappings
-
Nested classes/interfaces inherited from interface com.google.common.css.SubstitutionMap
SubstitutionMap.Initializable
-
-
Constructor Summary
Constructors Constructor Description SplittingSubstitutionMap(SubstitutionMap substitutionMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(java.lang.String key)Gets the string that should be substituted forkey.MultipleMappingSubstitutionMap.ValueWithMappingsgetValueWithMappings(java.lang.String key)Like an ordinarySubstitutionMap, this returns a value to substitute for the specifiedkey.voidinitializeWithMappings(java.util.Map<? extends java.lang.String,? extends java.lang.String> newMappings)
-
-
-
Constructor Detail
-
SplittingSubstitutionMap
public SplittingSubstitutionMap(SubstitutionMap substitutionMap)
-
-
Method Detail
-
initializeWithMappings
public void initializeWithMappings(java.util.Map<? extends java.lang.String,? extends java.lang.String> newMappings)
- Specified by:
initializeWithMappingsin interfaceSubstitutionMap.Initializable
-
get
public java.lang.String get(java.lang.String key)
Description copied from interface:SubstitutionMapGets the string that should be substituted forkey. The same value must be consistently returned for any particularkey, and the returned value must not be returned for any otherkeyvalue.- Specified by:
getin interfaceSubstitutionMap- Parameters:
key- the text to be replaced (never null)- Returns:
- the value to substitute for
key
-
getValueWithMappings
public MultipleMappingSubstitutionMap.ValueWithMappings getValueWithMappings(java.lang.String key)
Description copied from interface:MultipleMappingSubstitutionMapLike 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.- Specified by:
getValueWithMappingsin interfaceMultipleMappingSubstitutionMap
-
-