Flow is a template class that holds the state based on the 'state pattern'.
The interface of the command set whose behavior changes depending on the state is given by the Commands parameter.
The default base class of this template class is Object, but it can be specified by Base.
The initial state of the concrete instance of Commands is given to the constructor of this template class,
and transition is made according to the return value of each command.
If the command returns null, the transition is ended.
Flow template class
Flow is a template class that holds the state based on the 'state pattern'. The interface of the command set whose behavior changes depending on the state is given by the Commands parameter. The default base class of this template class is Object, but it can be specified by Base. The initial state of the concrete instance of Commands is given to the constructor of this template class, and transition is made according to the return value of each command. If the command returns null, the transition is ended.