Package com.blackrook.rookscript.lang
Class ScriptCommand
java.lang.Object
com.blackrook.rookscript.lang.ScriptCommand
Single script directive.
- Author:
- Matthew Tropiano
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScriptCommand
create
(ScriptCommandType type) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, boolean operand) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, double operand) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, long operand) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, Integer operand1, boolean operand2) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, Long operand1, boolean operand2) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, Object operand) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, String operand) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, String operand1, boolean operand2) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, String operand1, double operand2) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, String operand1, long operand2) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, String operand1, Object operand2) Creates a new script directive.static ScriptCommand
create
(ScriptCommandType type, String operand1, String operand2) Creates a new script directive.boolean
execute
(ScriptInstance scriptInstance) Executes this command.getType()
toString()
-
Method Details
-
create
Creates a new script directive.- Parameters:
type
- the directive type.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand
- the operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand
- the operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand
- the operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand
- the only operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand
- the only operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
create
Creates a new script directive.- Parameters:
type
- the directive type.operand1
- the first operand.operand2
- the second operand.- Returns:
- a new script directive.
-
getType
-
getOperand1
-
getOperand2
-
execute
Executes this command.- Parameters:
scriptInstance
- the originating script instance.- Returns:
- if false, stop script running, else if true, continue.
-
toString
-