Package org.nwolfhub.easycli
Class VariableProcessor
java.lang.Object
org.nwolfhub.easycli.VariableProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new variable to the list of variables.voidclearAll()Clears all variables from the list.Returns a new ArrayList containing all variables in the list.processText(String text) Applies all variables to provided textvoidremoveVariable(int index) Removes the variable at the specified index from the list of variables.
-
Constructor Details
-
VariableProcessor
public VariableProcessor()
-
-
Method Details
-
addVariable
Adds a new variable to the list of variables.- Parameters:
v- the variable to be added
-
getVariables
Returns a new ArrayList containing all variables in the list.- Returns:
- a new ArrayList of variables
-
removeVariable
public void removeVariable(int index) Removes the variable at the specified index from the list of variables.- Parameters:
index- the index of the variable to be removed
-
clearAll
public void clearAll()Clears all variables from the list. -
processText
Applies all variables to provided text- Parameters:
text- original text- Returns:
- updated text
-