Class 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
    • 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 use
        lhsAttributeName - the lhs attribute name
        rhsOperand - the rhs operand
        rhsIsAttribute - true if the rhs operand is an attribute
        isAnOr - 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
      • evaluate

        public boolean evaluate​(Instance inst,
                                boolean result)
        Description copied from class: FlowByExpression.ExpressionNode
        Evaluate this node and combine with the result so far
        Specified by:
        evaluate in class FlowByExpression.ExpressionNode
        Parameters:
        inst - the incoming instance to evalute with
        result - the result to combine with
        Returns:
        the result after combining with this node
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toJTree

        public javax.swing.tree.DefaultMutableTreeNode toJTree​(javax.swing.tree.DefaultMutableTreeNode parent)
        Description copied from class: FlowByExpression.ExpressionNode
        Get a DefaultMutableTreeNode for this node
        Specified by:
        toJTree in class FlowByExpression.ExpressionNode
        Parameters:
        parent - the parent of this node (if any)
        Returns:
        the DefaultMutableTreeNode for this node