-
- /**
- * Returns the current state of the reaction. If the reaction was not
- * yet executed, this method returns {@code null}.
- *
- * @return The current state of the reaction
- */
- public net.pterodactylus.reactor.State currentState() {
- return currentState;
- }
-
- /**
- * Returns the previous state of the reaction. If the reaction was not
- * yet executed at least twice, this method returns {@code null}.
- *
- * @return The previous state of the reaction
- */
- public net.pterodactylus.reactor.State previousState() {
- return previousState;
- }
-
- /**
- * Sets the last execution time of the reaction.
- *
- * @param lastExecutionTime
- * The last execution time of the reaction (in milliseconds
- * since Jan 1, 1970 UTC)
- * @return This execution
- */
- public ReactionExecution setLastExecutionTime(long lastExecutionTime) {
- this.lastExecutionTime = lastExecutionTime;
- return this;
- }
-
- //
- // ACTIONS
- //
-
- /**
- * Adds the given state as current state and moves the current state
- * into the previous state.
- *
- * @param state
- * The new current state
- * @return This execution
- */
- public ReactionExecution addState(net.pterodactylus.reactor.State state) {
- previousState = currentState;
- currentState = state;
- return this;
- }
-