akka/akka-core

Compose matchState methods in AbstractFSM

Open

#17.718 aberto em 15 de jun. de 2015

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Scala (3.547 forks)batch import
1 - triagedhelp wantedt:core

Métricas do repositório

Stars
 (13.277 stars)
Métricas de merge de PR
 (Mesclagem média 8d 19h) (10 fundiu PRs em 30d)

Description

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.

Guia do colaborador