Class PathMatcher

java.lang.Object
software.amazon.smithy.waiters.PathMatcher
All Implemented Interfaces:
software.amazon.smithy.model.node.ToNode

public final class PathMatcher extends Object implements software.amazon.smithy.model.node.ToNode
A Matcher implementation for inputPathList, outputPathList, and errorPathList.
  • Constructor Details

    • PathMatcher

      public PathMatcher(String path, String expected, PathComparator comparator)
      Parameters:
      path - The path to execute.
      expected - The expected value of the path.
      comparator - Comparison performed on the list value.
  • Method Details

    • getPath

      public String getPath()
      Gets the path to execute.
      Returns:
      Returns the path to execute.
    • getExpected

      public String getExpected()
      Gets the expected return value of each element returned by the path.
      Returns:
      The return value to compare each result against.
    • getComparator

      public PathComparator getComparator()
      Gets the comparison performed on the list.
      Returns:
      Returns the comparator.
    • fromNode

      public static PathMatcher fromNode(software.amazon.smithy.model.node.Node node)
      Creates a new instance from a Node.
      Parameters:
      node - Node tom create the PathMatcher from.
      Returns:
      Returns the created PathMatcher.
      Throws:
      software.amazon.smithy.model.node.ExpectationNotMetException - if the given Node is invalid.
    • toNode

      public software.amazon.smithy.model.node.Node toNode()
      Specified by:
      toNode in interface software.amazon.smithy.model.node.ToNode
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object