Class Acceptor

java.lang.Object
software.amazon.smithy.waiters.Acceptor
All Implemented Interfaces:
ToNode

public final class Acceptor extends Object implements ToNode
Represents an acceptor in a waiter's state machine.
  • Constructor Details

    • Acceptor

      public Acceptor(AcceptorState state, Matcher<?> matcher)
      Parameters:
      state - State the acceptor transitions to when matched.
      matcher - The matcher to match against.
  • Method Details

    • getState

      public AcceptorState getState()
      Gets the state to transition to if matched.
      Returns:
      Acceptor state to transition to.
    • getMatcher

      public Matcher<?> getMatcher()
      Gets the matcher used to test if the acceptor.
      Returns:
      Returns the matcher.
    • fromNode

      public static Acceptor fromNode(Node node)
      Creates an Acceptor from a Node.
      Parameters:
      node - Node to create the Acceptor from.
      Returns:
      Returns the created Acceptor.
      Throws:
      ExpectationNotMetException - if the given Node is invalid.
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object