@startuml
!theme mimeograph
class Context {
+ {static} State STATE_A
+ {static} State STATE_B
- State currentState
+ void setState(State)
+ State getState()
+ void handle()
}

class ConcreteStateB {
+ void handle()
}

class ConcreteStateA {
+ void handle()
}
abstract class State {
# Context context
+ void setContext(Context)
+ {abstract}void handle()
}


State <|-- ConcreteStateB
State <|-- ConcreteStateA
Context <-- State
State <-- Context
@enduml