Package org.nwolfhub.easycli.model
Class Template
java.lang.Object
org.nwolfhub.easycli.model.Template
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a new variable to the list of variables processed by the variable processor.Clears all the variables in the list of variables processed by the variable processor.formatText(String text, Level level) Applies all template rules to the textgetName()Retrieves the postfix value.Retrieves the prefix value.Returns a list of all variables processed by the variable processor.removeVariable(int index) Removes the variable at the specified index from the list of variables processed by the variable processor.sets a name for the template that can be used later to use it in EasyCLIsetPostfix(String postfix) Sets the postfix value.Sets the prefix value.
-
Field Details
-
name
-
prefix
-
postfix
-
border
-
-
Constructor Details
-
Template
public Template() -
Template
-
-
Method Details
-
getName
-
setName
sets a name for the template that can be used later to use it in EasyCLI- Parameters:
name- - name of a template
-
getPrefix
Retrieves the prefix value.- Returns:
- the prefix value as a String.
-
setPrefix
Sets the prefix value. Prefix will be added before the text- Parameters:
prefix- the prefix value to be set as a String.
-
getPostfix
Retrieves the postfix value.- Returns:
- the postfix value as a String.
-
setPostfix
Sets the postfix value. Postfix will be added after the text- Parameters:
postfix- the postfix value to be set as a String.
-
getBorder
-
setBorder
-
formatText
Applies all template rules to the text- Parameters:
text- - unedited text- Returns:
- modified text
-
addVariable
Adds a new variable to the list of variables processed by the variable processor.- Parameters:
v- the variable to be added
-
removeVariable
Removes the variable at the specified index from the list of variables processed by the variable processor.- Parameters:
index- the index of the variable to be removed
-
clearVariables
Clears all the variables in the list of variables processed by the variable processor. -
getVariables
Returns a list of all variables processed by the variable processor.- Returns:
- a list of Variable objects
-