Package weka.knowledgeflow.steps
Class FlowByExpression.ExpressionClause
java.lang.Object
weka.knowledgeflow.steps.FlowByExpression.ExpressionNode
weka.knowledgeflow.steps.FlowByExpression.ExpressionClause
- All Implemented Interfaces:
Serializable
- Enclosing class:
- FlowByExpression
public static class FlowByExpression.ExpressionClause
extends FlowByExpression.ExpressionNode
implements Serializable
An expression node that represents a clause of an expression
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionExpressionClause
(FlowByExpression.ExpressionClause.ExpressionType operator, String lhsAttributeName, String rhsOperand, boolean rhsIsAttribute, boolean isAnOr) Construct a new ExpressionClause -
Method Summary
Modifier and TypeMethodDescriptionboolean
Evaluate this node and combine with the result so farGet the lhs attribute nameGet the operatorGet the rhs operandvoid
init
(Instances structure, Environment env) Initialize the nodeboolean
Returns true if the RHS is an attribute rather than a constantvoid
setLHSAttName
(String attName) Set the lhs attribute namevoid
Set the operatorvoid
setRHSIsAnAttribute
(boolean rhs) Set whether the RHS is an attribute rather than a constantvoid
setRHSOperand
(String opp) Set the rhs operandtoJTree
(DefaultMutableTreeNode parent) Get a DefaultMutableTreeNode for this nodetoString()
void
toStringDisplay
(StringBuffer buff) Get the display representation of this nodevoid
toStringInternal
(StringBuffer buff) Get the internal representation of this nodeMethods inherited from class weka.knowledgeflow.steps.FlowByExpression.ExpressionNode
isNegated, isOr, setIsOr, setNegated, setShowAndOr
-
Constructor Details
-
ExpressionClause
public ExpressionClause() -
ExpressionClause
public ExpressionClause(FlowByExpression.ExpressionClause.ExpressionType operator, String lhsAttributeName, String rhsOperand, boolean rhsIsAttribute, boolean isAnOr) Construct a new ExpressionClause- Parameters:
operator
- the operator to uselhsAttributeName
- the lhs attribute namerhsOperand
- the rhs operandrhsIsAttribute
- true if the rhs operand is an attributeisAnOr
- true if the result of this expression is to be OR'ed with the result so far
-
-
Method Details
-
getLHSAttName
Get the lhs attribute name- Returns:
- the lhs attribute name
-
setLHSAttName
Set the lhs attribute name- Parameters:
attName
- the lhs att naem
-
getRHSOperand
Get the rhs operand- Returns:
- the rhs operando
-
setRHSOperand
Set the rhs operand- Parameters:
opp
- the rhs operand to set
-
isRHSAnAttribute
public boolean isRHSAnAttribute()Returns true if the RHS is an attribute rather than a constant- Returns:
- true if the RHS is an attribute
-
setRHSIsAnAttribute
public void setRHSIsAnAttribute(boolean rhs) Set whether the RHS is an attribute rather than a constant- Parameters:
rhs
- true if the RHS is an attribute rather than a constant
-
getOperator
Get the operator- Returns:
- the operator
-
setOperator
Set the operator- Parameters:
opp
- the operator to use
-
init
Description copied from class:FlowByExpression.ExpressionNode
Initialize the node- Overrides:
init
in classFlowByExpression.ExpressionNode
- Parameters:
structure
- the structure of the incoming instancesenv
- Environment variables
-
evaluate
Description copied from class:FlowByExpression.ExpressionNode
Evaluate this node and combine with the result so far- Specified by:
evaluate
in classFlowByExpression.ExpressionNode
- Parameters:
inst
- the incoming instance to evalute withresult
- the result to combine with- Returns:
- the result after combining with this node
-
toString
-
toStringDisplay
Description copied from class:FlowByExpression.ExpressionNode
Get the display representation of this node- Specified by:
toStringDisplay
in classFlowByExpression.ExpressionNode
- Parameters:
buff
- the string buffer to append to
-
toStringInternal
Description copied from class:FlowByExpression.ExpressionNode
Get the internal representation of this node- Specified by:
toStringInternal
in classFlowByExpression.ExpressionNode
- Parameters:
buff
- the string buffer to append to
-
toJTree
Description copied from class:FlowByExpression.ExpressionNode
Get a DefaultMutableTreeNode for this node- Specified by:
toJTree
in classFlowByExpression.ExpressionNode
- Parameters:
parent
- the parent of this node (if any)- Returns:
- the DefaultMutableTreeNode for this node
-