java.lang.Object
com.wyu4.snowberryjam.compiler.data.tasks.SetTask
- All Implemented Interfaces:
ExecutableTask,NamedTask,ValuedTask
- Direct Known Subclasses:
DecreaseMacro,IncreaseMacro,InputMacro
A variable setter statement. The name of the variable is stored as
SourceKey.NAME, and the new value is stored as
SourceKey.VALUE.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ValueHolderThe name of the variable to set.private final ValueHolderThe new value of the variable. -
Constructor Summary
ConstructorsConstructorDescriptionSetTask(com.fasterxml.jackson.databind.JsonNode node) Create a new set statementSetTask(ValueHolder name, ValueHolder value) Create a new set statement -
Method Summary
-
Field Details
-
name
The name of the variable to set. Can be any type, but the string value will be provided toLocalStorage.- See Also:
-
value
The new value of the variable.- See Also:
-
-
Constructor Details
-
SetTask
public SetTask(com.fasterxml.jackson.databind.JsonNode node) Create a new set statement- Parameters:
node- TheJsonNodeto refer
-
SetTask
Create a new set statement- Parameters:
name- The name of the variablevalue- The value of the variable
-
-
Method Details
-
execute
public void execute()Description copied from interface:ExecutableTaskRun the task- Specified by:
executein interfaceExecutableTask
-
getId
Description copied from interface:ExecutableTaskGet the ID of the task- Specified by:
getIdin interfaceExecutableTask- Returns:
SourceId.SET
-
getNameValue
-
feedback
Description copied from interface:ExecutableTaskGet some feedback from the task. Can be anything, depending on the task.- Specified by:
feedbackin interfaceExecutableTask- Returns:
- The new value
-
toString
-
getValue
- Specified by:
getValuein interfaceValuedTask
-
getName
-