FSM 001: Move Abstractions to JDK Classes

FSM-001 Replace Guard and Action classes with JDK BiPredicate and BiFunction Classes

Date: 2017-06-01




We need a legible data model for finite state machine definitions. New users should easily understand the finite state machine abstractions and map them to their domain.


We use standard classes of the JDK to minimize contextual complexity when learning and using the FSM library. We will evaluate if the loss of domain names for classes has a negative impact on the legibility of the library.


We have a cleaner and simpler interface and have increased dependency on regular JDK classes. The generic names of the guard predicate and functional action should not diminish the legibility of the source code. The role of the type is defined through the name of the parameter in the method signature.

Care was taken to use explicit parameter names and document them accordingly in JavaDoc. Modern IDEs such as IntelliJ IDEA display formatted JavaDoc as hints to the developer.