Class ExpressionDirective
java.lang.Object
com.blackrook.expression.node.ExpressionDirective
- All Implemented Interfaces:
ExpressionNode
Single expression directive.
- Author:
- Matthew Tropiano
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionDirectiveCreates a new Expression directive.static ExpressionDirectivecreate(ExpressionDirectiveType type, boolean operand) Creates a new Expression directive.static ExpressionDirectivecreate(ExpressionDirectiveType type, double operand) Creates a new Expression directive.static ExpressionDirectivecreate(ExpressionDirectiveType type, long operand) Creates a new Expression directive.static ExpressionDirectivecreate(ExpressionDirectiveType type, String operand) Creates a new Expression directive.booleanexecute(ExpressionStack stack, ExpressionVariableContext context) Executes this node.getType()booleanChecks if this node is collapsable.toString()voidwriteBytes(OutputStream out) Write value as bytes (for digest later).
-
Method Details
-
create
Creates a new Expression directive.- Parameters:
type- the directive type.- Returns:
- a new expression directive.
-
create
Creates a new Expression directive.- Parameters:
type- the directive type.operand- the operand.- Returns:
- a new expression directive.
-
create
Creates a new Expression directive.- Parameters:
type- the directive type.operand- the operand.- Returns:
- a new expression directive.
-
create
Creates a new Expression directive.- Parameters:
type- the directive type.operand- the operand.- Returns:
- a new expression directive.
-
create
Creates a new Expression directive.- Parameters:
type- the directive type.operand- the operand.- Returns:
- a new expression directive.
-
getType
-
getOperand
-
isCollapsable
public boolean isCollapsable()Description copied from interface:ExpressionNodeChecks if this node is collapsable.- Specified by:
isCollapsablein interfaceExpressionNode- Returns:
- true if so, false if not.
-
execute
Description copied from interface:ExpressionNodeExecutes this node.- Specified by:
executein interfaceExpressionNode- Parameters:
stack- the stack to use.context- the context for added variables.- Returns:
- if false, stop expression calculation, else if true, continue.
-
writeBytes
Description copied from interface:ExpressionNodeWrite value as bytes (for digest later).- Specified by:
writeBytesin interfaceExpressionNode- Parameters:
out- the output stream.- Throws:
IOException- on a write error.
-
toString
-