protected static class FlowByExpression.ExpressionClause extends FlowByExpression.ExpressionNode implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
FlowByExpression.ExpressionClause.ExpressionType |
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_lhsAttIndex
The index of the lhs attribute
|
protected java.lang.String |
m_lhsAttributeName
The name of the lhs attribute
|
protected double |
m_numericOperand
The rhs operand (if constant and is a number )
|
protected FlowByExpression.ExpressionClause.ExpressionType |
m_operator
The operator for this expression
|
protected java.util.regex.Pattern |
m_regexPattern
the compiled regex pattern (if the operator is REGEX)
|
protected java.lang.String |
m_resolvedLhsName
The name of the lhs attribute after resolving variables
|
protected java.lang.String |
m_resolvedRhsOperand
The rhs operand after resolving variables
|
protected int |
m_rhsAttIndex
index of the rhs if it is an attribute
|
protected boolean |
m_rhsIsAttribute
True if the rhs operand is an attribute
|
protected java.lang.String |
m_rhsOperand
The rhs operand (constant value or attribute name)
|
m_env, m_isAnOr, m_isNegated, m_showAndOr| Constructor and Description |
|---|
ExpressionClause() |
ExpressionClause(FlowByExpression.ExpressionClause.ExpressionType operator,
java.lang.String lhsAttributeName,
java.lang.String rhsOperand,
boolean rhsIsAttribute,
boolean isAnOr)
Construct a new ExpressionClause
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(Instance inst,
boolean result)
Evaluate this node and combine with the result so far
|
void |
init(Instances structure,
Environment env)
Initialize the node
|
protected java.lang.String |
parseFromInternal(java.lang.String expression)
Parse and initialize from the internal representation
|
javax.swing.tree.DefaultMutableTreeNode |
toJTree(javax.swing.tree.DefaultMutableTreeNode parent)
Get a DefaultMutableTreeNode for this node
|
java.lang.String |
toString() |
void |
toStringDisplay(java.lang.StringBuffer buff)
Get the display representation of this node
|
protected void |
toStringInternal(java.lang.StringBuffer buff)
Get the internal representation of this node
|
isNegated, isOr, setIsOr, setNegated, setShowAndOrprotected FlowByExpression.ExpressionClause.ExpressionType m_operator
protected java.lang.String m_lhsAttributeName
protected int m_lhsAttIndex
protected java.lang.String m_rhsOperand
protected boolean m_rhsIsAttribute
protected int m_rhsAttIndex
protected java.lang.String m_resolvedLhsName
protected java.lang.String m_resolvedRhsOperand
protected java.util.regex.Pattern m_regexPattern
protected double m_numericOperand
public ExpressionClause()
public ExpressionClause(FlowByExpression.ExpressionClause.ExpressionType operator, java.lang.String lhsAttributeName, java.lang.String rhsOperand, boolean rhsIsAttribute, boolean isAnOr)
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 farpublic void init(Instances structure, Environment env)
FlowByExpression.ExpressionNodeinit in class FlowByExpression.ExpressionNodestructure - the structure of the incoming instancesenv - Environment variablespublic boolean evaluate(Instance inst, boolean result)
FlowByExpression.ExpressionNodeevaluate in class FlowByExpression.ExpressionNodeinst - the incoming instance to evalute withresult - the result to combine withpublic java.lang.String toString()
toString in class java.lang.Objectpublic void toStringDisplay(java.lang.StringBuffer buff)
FlowByExpression.ExpressionNodetoStringDisplay in class FlowByExpression.ExpressionNodebuff - the string buffer to append toprotected void toStringInternal(java.lang.StringBuffer buff)
FlowByExpression.ExpressionNodetoStringInternal in class FlowByExpression.ExpressionNodebuff - the string buffer to append topublic javax.swing.tree.DefaultMutableTreeNode toJTree(javax.swing.tree.DefaultMutableTreeNode parent)
FlowByExpression.ExpressionNodetoJTree in class FlowByExpression.ExpressionNodeparent - the parent of this node (if any)protected java.lang.String parseFromInternal(java.lang.String expression)
FlowByExpression.ExpressionNodeparseFromInternal in class FlowByExpression.ExpressionNodeexpression - the expression to parse in internal representation