Package weka.knowledgeflow.steps
Class FlowByExpression.ExpressionClause
- java.lang.Object
-
- weka.knowledgeflow.steps.FlowByExpression.ExpressionNode
-
- weka.knowledgeflow.steps.FlowByExpression.ExpressionClause
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- FlowByExpression
public static class FlowByExpression.ExpressionClause extends FlowByExpression.ExpressionNode implements java.io.Serializable
An expression node that represents a clause of an expression- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlowByExpression.ExpressionClause.ExpressionType
-
Constructor Summary
Constructors Constructor Description ExpressionClause()ExpressionClause(FlowByExpression.ExpressionClause.ExpressionType operator, java.lang.String lhsAttributeName, java.lang.String rhsOperand, boolean rhsIsAttribute, boolean isAnOr)Construct a new ExpressionClause
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(Instance inst, boolean result)Evaluate this node and combine with the result so farjava.lang.StringgetLHSAttName()Get the lhs attribute nameFlowByExpression.ExpressionClause.ExpressionTypegetOperator()Get the operatorjava.lang.StringgetRHSOperand()Get the rhs operandvoidinit(Instances structure, Environment env)Initialize the nodebooleanisRHSAnAttribute()Returns true if the RHS is an attribute rather than a constantvoidsetLHSAttName(java.lang.String attName)Set the lhs attribute namevoidsetOperator(FlowByExpression.ExpressionClause.ExpressionType opp)Set the operatorvoidsetRHSIsAnAttribute(boolean rhs)Set whether the RHS is an attribute rather than a constantvoidsetRHSOperand(java.lang.String opp)Set the rhs operandjavax.swing.tree.DefaultMutableTreeNodetoJTree(javax.swing.tree.DefaultMutableTreeNode parent)Get a DefaultMutableTreeNode for this nodejava.lang.StringtoString()voidtoStringDisplay(java.lang.StringBuffer buff)Get the display representation of this nodevoidtoStringInternal(java.lang.StringBuffer buff)Get the internal representation of this node-
Methods inherited from class weka.knowledgeflow.steps.FlowByExpression.ExpressionNode
isNegated, isOr, setIsOr, setNegated, setShowAndOr
-
-
-
-
Constructor Detail
-
ExpressionClause
public ExpressionClause()
-
ExpressionClause
public ExpressionClause(FlowByExpression.ExpressionClause.ExpressionType operator, java.lang.String lhsAttributeName, java.lang.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 Detail
-
getLHSAttName
public java.lang.String getLHSAttName()
Get the lhs attribute name- Returns:
- the lhs attribute name
-
setLHSAttName
public void setLHSAttName(java.lang.String attName)
Set the lhs attribute name- Parameters:
attName- the lhs att naem
-
getRHSOperand
public java.lang.String getRHSOperand()
Get the rhs operand- Returns:
- the rhs operando
-
setRHSOperand
public void setRHSOperand(java.lang.String opp)
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
public FlowByExpression.ExpressionClause.ExpressionType getOperator()
Get the operator- Returns:
- the operator
-
setOperator
public void setOperator(FlowByExpression.ExpressionClause.ExpressionType opp)
Set the operator- Parameters:
opp- the operator to use
-
init
public void init(Instances structure, Environment env)
Description copied from class:FlowByExpression.ExpressionNodeInitialize the node- Overrides:
initin classFlowByExpression.ExpressionNode- Parameters:
structure- the structure of the incoming instancesenv- Environment variables
-
evaluate
public boolean evaluate(Instance inst, boolean result)
Description copied from class:FlowByExpression.ExpressionNodeEvaluate this node and combine with the result so far- Specified by:
evaluatein classFlowByExpression.ExpressionNode- Parameters:
inst- the incoming instance to evalute withresult- the result to combine with- Returns:
- the result after combining with this node
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringDisplay
public void toStringDisplay(java.lang.StringBuffer buff)
Description copied from class:FlowByExpression.ExpressionNodeGet the display representation of this node- Specified by:
toStringDisplayin classFlowByExpression.ExpressionNode- Parameters:
buff- the string buffer to append to
-
toStringInternal
public void toStringInternal(java.lang.StringBuffer buff)
Description copied from class:FlowByExpression.ExpressionNodeGet the internal representation of this node- Specified by:
toStringInternalin classFlowByExpression.ExpressionNode- Parameters:
buff- the string buffer to append to
-
toJTree
public javax.swing.tree.DefaultMutableTreeNode toJTree(javax.swing.tree.DefaultMutableTreeNode parent)
Description copied from class:FlowByExpression.ExpressionNodeGet a DefaultMutableTreeNode for this node- Specified by:
toJTreein classFlowByExpression.ExpressionNode- Parameters:
parent- the parent of this node (if any)- Returns:
- the DefaultMutableTreeNode for this node
-
-