Class ConditionDependencyGraph.OrderConstraints

java.lang.Object
software.amazon.smithy.rulesengine.logic.cfg.ConditionDependencyGraph.OrderConstraints
Enclosing class:
ConditionDependencyGraph

public final class ConditionDependencyGraph.OrderConstraints extends Object
Order-specific constraints for a particular condition ordering.
  • Method Details

    • canMove

      public boolean canMove(int from, int to)
      Checks if moving a condition from one position to another would violate dependencies.
      Parameters:
      from - current position
      to - target position
      Returns:
      true if the move is valid
    • getMinValidPosition

      public int getMinValidPosition(int positionIndex)
      Gets the minimum valid position for a condition.
      Parameters:
      positionIndex - the position index in the ordering
      Returns:
      the minimum position where this condition can be placed
    • getMaxValidPosition

      public int getMaxValidPosition(int positionIndex)
      Gets the maximum valid position for a condition.
      Parameters:
      positionIndex - the position index in the ordering
      Returns:
      the maximum position where this condition can be placed