@NotThreadSafe public class PSXPathVariables extends Object
| Constructor and Description |
|---|
PSXPathVariables() |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.state.EChange |
add(Map.Entry<String,String> aEntry)
Add a new variable.
|
com.helger.commons.state.EChange |
add(String sName,
String sValue)
Add a new variable.
|
boolean |
contains(String sName) |
String |
get(String sName) |
Map<String,String> |
getAll() |
String |
getAppliedReplacement(String sText)
Perform the text replacement of all variables in the specified text.
|
com.helger.commons.state.EChange |
remove(String sVarName)
Remove the variable with the specified name
|
com.helger.commons.state.EChange |
removeAll(Iterable<String> aVars)
Remove all variables with the specified names
|
@Nonnull public com.helger.commons.state.EChange add(@Nonnull Map.Entry<String,String> aEntry)
aEntry - The entry to be added - key is the variable name and value is the
variable value. May not be null.EChange.UNCHANGED if a variable with the same name is
already present. Never null.@Nonnull public com.helger.commons.state.EChange add(@Nonnull@Nonempty String sName, @Nonnull@Nonempty String sValue)
sName - The name of the variable. May neither be null nor
empty.sValue - The value of the variable. May neither be null nor
empty.EChange.UNCHANGED if a variable with the same name is
already present. Never null.@Nullable public String getAppliedReplacement(@Nullable String sText)
sText - The source text. May be null.null if the
source text is null.@Nonnull public com.helger.commons.state.EChange remove(@Nullable String sVarName)
sVarName - The name of the variable to be removed. May be null.EChange.CHANGED if the variable was removed successfully.
Never null.@Nonnull public com.helger.commons.state.EChange removeAll(@Nullable Iterable<String> aVars)
aVars - A list of variable names to be removed. May be null.EChange.CHANGED if at least one variable was removed
successfully. Never null.Copyright © 2014–2015 Philip Helger. All rights reserved.