Class PSXPathVariables
java.lang.Object
com.helger.schematron.pure.binding.xpath.PSXPathVariables
- All Implemented Interfaces:
com.helger.commons.lang.ICloneable<PSXPathVariables>,IPSXPathVariables,Serializable
This class manages all variables present in Schematron <let> elements.
- Author:
- Philip Helger
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.helger.commons.state.EChangeAdd a new variable.com.helger.commons.state.EChangeAdd a new variable.booleangetAll()getAppliedReplacement(String sText) Perform the text replacement of all variables in the specified text.getClone()com.helger.commons.state.EChangeRemove the variable with the specified namecom.helger.commons.state.EChangeRemove all variables with the specified namestoString()
-
Constructor Details
-
PSXPathVariables
public PSXPathVariables() -
PSXPathVariables
-
-
Method Details
-
add
Add a new variable.- Parameters:
aEntry- The entry to be added - key is the variable name and value is the variable value. May not benull.- Returns:
EChange.UNCHANGEDif a variable with the same name is already present. Nevernull.
-
add
@Nonnull public com.helger.commons.state.EChange add(@Nonnull @Nonempty String sName, @Nonnull @Nonempty String sValue) Add a new variable.- Parameters:
sName- The name of the variable. May neither benullnor empty.sValue- The value of the variable. May neither benullnor empty.- Returns:
EChange.UNCHANGEDif a variable with the same name is already present. Nevernull.
-
getAppliedReplacement
Description copied from interface:IPSXPathVariablesPerform the text replacement of all variables in the specified text.- Specified by:
getAppliedReplacementin interfaceIPSXPathVariables- Parameters:
sText- The source text. May benull.- Returns:
- The text with all values replaced. May be
nullif the source text isnull.
-
remove
Remove the variable with the specified name- Parameters:
sVarName- The name of the variable to be removed. May benull.- Returns:
EChange.CHANGEDif the variable was removed successfully. Nevernull.
-
removeAll
Remove all variables with the specified names- Parameters:
aVars- A list of variable names to be removed. May benull.- Returns:
EChange.CHANGEDif at least one variable was removed successfully. Nevernull.
-
getAll
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsNavigableMap<String,String> getAll()- Specified by:
getAllin interfaceIPSXPathVariables- Returns:
- All contained variable key value pairs. Never
null.
-
contains
- Specified by:
containsin interfaceIPSXPathVariables- Parameters:
sName- Name of the variable to check- Returns:
trueif a variable with the passed name in present.
-
get
- Specified by:
getin interfaceIPSXPathVariables- Parameters:
sName- Variable name- Returns:
- The variable value of the variable with the specified name or
nullif no such variable is present.
-
getClone
- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<PSXPathVariables>
-
toString
-