Class ConditionNode

java.lang.Object
software.amazon.smithy.rulesengine.logic.cfg.CfgNode
software.amazon.smithy.rulesengine.logic.cfg.ConditionNode

public final class ConditionNode extends CfgNode
A CFG node that evaluates a condition and branches based on the result.
  • Constructor Details

    • ConditionNode

      public ConditionNode(ConditionReference condition, CfgNode trueBranch, CfgNode falseBranch)
      Creates a new condition node.
      Parameters:
      condition - condition reference (can be negated)
      trueBranch - node to evaluate if the condition is true
      falseBranch - node to evaluate if the condition is false
  • Method Details

    • getCondition

      public ConditionReference getCondition()
      Returns the condition reference for this node.
      Returns:
      the condition reference
    • getTrueBranch

      public CfgNode getTrueBranch()
      Returns the node to evaluate if the condition is true.
      Returns:
      the true branch node
    • getFalseBranch

      public CfgNode getFalseBranch()
      Returns the node to evaluate if the condition is false.
      Returns:
      the false branch node
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object