Class Matcher<T>

java.lang.Object
software.amazon.smithy.waiters.Matcher<T>
All Implemented Interfaces:
ToNode
Direct Known Subclasses:
Matcher.ErrorTypeMember, Matcher.InputOutputMember, Matcher.OutputMember, Matcher.SuccessMember, Matcher.UnknownMember

public abstract class Matcher<T> extends Object implements ToNode
Determines if an acceptor matches the current state of a resource.
  • Method Details

    • getValue

      public abstract T getValue()
      Gets the value of the set matcher variant.
      Returns:
      Returns the set variant's value.
    • getMemberName

      public abstract String getMemberName()
      Gets the member name of the matcher.
      Returns:
      Returns the set member name.
    • accept

      public abstract <U> U accept(Matcher.Visitor<U> visitor)
      Visits the Matcher union type.
      Type Parameters:
      U - The type returned by the visitor.
      Parameters:
      visitor - Visitor to apply.
      Returns:
      Returns the return value of the visitor.
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

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

      public static Matcher<?> fromNode(Node node)
      Creates a Matcher from a Node.
      Parameters:
      node - Node to create a Matcher from.
      Returns:
      Returns the create Matcher.
      Throws:
      ExpectationNotMetException - if the given node is invalid.