Class ConcreteStateA

java.lang.Object
Behavioral.State.ConcreteStateA
All Implemented Interfaces:
State

public class ConcreteStateA extends Object implements State
Concrete implementation of State representing State A.
  • Constructor Details

    • ConcreteStateA

      public ConcreteStateA()
      Default constructor for ConcreteStateA.
  • Method Details

    • handle

      public void handle(Context context)
      Description copied from interface: State
      Handles the context-specific behavior for this state.
      Specified by:
      handle in interface State
      Parameters:
      context - The context object whose state is being handled.
    • getName

      public String getName()
      Description copied from interface: State
      Gets the name of the current state for debugging purposes.
      Specified by:
      getName in interface State
      Returns:
      The name of the state.