akka/akka-core

Compose matchState methods in AbstractFSM

Open

#17,718 opened on 2015年6月15日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Scala (3,547 forks)batch import
1 - triagedhelp wantedt:core

Repository metrics

Stars
 (13,277 stars)
PR merge metrics
 (平均マージ 8d 19h) (30d で 10 merged PRs)

説明

In scala version I can do this:

    onTransition {
      case _ -> State.Pausing => log.debug("Transitioning into pausing state")
      case _ -> State.Running => log.debug("Transitioning into running state")
    }

but in Java version using matchState method I can only one state transition

onTransition(
        matchState(GameEngineState.Running, GameEngineState.Pausing,
              () -> log().debug("Transitioning into pausing state")));

We would need a way to compose matchState methods.

コントリビューターガイド