Package io.hektor.fsm.builder.exceptions
Enum Class FSMBuilderException.ErrorCode
java.lang.Object
java.lang.Enum<FSMBuilderException.ErrorCode>
io.hektor.fsm.builder.exceptions.FSMBuilderException.ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<FSMBuilderException.ErrorCode>,Constable
- Enclosing class:
- FSMBuilderException
There are many different issues that can occur when building the state machine
and instead of having individual exceptions for everything, we have these error
codes. The reason is that some of the issues that may arise may be hard to understand
and generic exceptions will not catch those scenarios so it is important that we have
enough documentation around those cases so the user, you, understand why building the
FSM failed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionYou can optionally specify a transformation with your transition but you can only do so if the state you are transitioning to is a so-called transient state.Every FSM must have its final state defined.Every FSM must have an initial state or we do not know where to start off with. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static FSMBuilderException.ErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_INITIAL_STATE
Every FSM must have an initial state or we do not know where to start off with. -
NO_FINAL_STATE
Every FSM must have its final state defined. -
ILLEGAL_TRANSFORMATION_ON_TRANSITION
You can optionally specify a transformation with your transition but you can only do so if the state you are transitioning to is a so-called transient state. SeeTransitionBuilder.withTransformation(Function)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getTemplate
-