public Result evaluate(FSM fsm, Input in) { return guard.evaluate(fsm, in).complement(); } }
public Guard.Result evaluate(FSM fsm, Input in) { AOMEntry entry = (AOMEntry) fsm; return Guard.Result.convert(entry.counter[0] > value); } };
private StateImpl getDefaultNextState(StateImpl currentState) { // Use the currentState defaults if set, otherwise use the state engine default. StateImpl nextState = (StateImpl) currentState.getDefaultNextState(); if (nextState == null) // The state engine default never changes the state nextState = currentState; return nextState; }
public StateEngine setDefault(State oldState, Action action, State newState) throws IllegalArgumentException, IllegalStateException { mustBeInitializing(); StateImpl oldStateImpl = (StateImpl) oldState; oldStateImpl.setDefaultAction(action); oldStateImpl.setDefaultNextState(newState); return this; }
public StateEngine add(State oldState, Input input, Action action, State newState) throws IllegalArgumentException, IllegalStateException { mustBeInitializing(); StateImpl oldStateImpl = (StateImpl) oldState; GuardedAction ta = new GuardedAction(action, newState); oldStateImpl.addGuardedAction(input, ta); return this; }
private Action getDefaultAction(StateImpl currentState) { Action action = currentState.getDefaultAction(); if (action == null) action = defaultAction; return action; }
public Complement(GuardBase guard) { super("not(" + guard.getName() + ")"); this.guard = guard; }
public FSM makeFSM(State startState) throws IllegalStateException { mustNotBeInitializing(); return new FSMImpl(this, startState); }
public void doIt(FSM fsm, Input in) { throw new INTERNAL("Invalid transition attempted from " + fsm.getState() + " under " + in); } };
public Result evaluate(FSM fsm, Input in) { return guard.evaluate(fsm, in).complement(); } }
public StateEngine setDefault(State oldState, Action action, State newState) throws IllegalArgumentException, IllegalStateException { mustBeInitializing(); StateImpl oldStateImpl = (StateImpl) oldState; oldStateImpl.setDefaultAction(action); oldStateImpl.setDefaultNextState(newState); return this; }
public StateEngine add(State oldState, Input input, Guard guard, Action action, State newState) throws IllegalArgumentException, IllegalStateException { mustBeInitializing(); StateImpl oldStateImpl = (StateImpl) oldState; GuardedAction ga = new GuardedAction(guard, action, newState); oldStateImpl.addGuardedAction(input, ga); return this; }
public Guard.Result evaluate(FSM fsm, Input in) { AOMEntry entry = (AOMEntry) fsm; return Guard.Result.convert(entry.counter[0] > value); } };
private StateImpl getDefaultNextState(StateImpl currentState) { // Use the currentState defaults if set, otherwise use the state engine default. StateImpl nextState = (StateImpl) currentState.getDefaultNextState(); if (nextState == null) // The state engine default never changes the state nextState = currentState; return nextState; }
private Action getDefaultAction(StateImpl currentState) { Action action = currentState.getDefaultAction(); if (action == null) action = defaultAction; return action; }
public Complement(GuardBase guard) { super("not(" + guard.getName() + ")"); this.guard = guard; }
public FSM makeFSM(State startState) throws IllegalStateException { mustNotBeInitializing(); return new FSMImpl(this, startState); }
public void doIt(FSM fsm, Input in) { throw new INTERNAL("Invalid transition attempted from " + fsm.getState() + " under " + in); } };
public StateEngine add(State oldState, Input input, Action action, State newState) throws IllegalArgumentException, IllegalStateException { mustBeInitializing(); StateImpl oldStateImpl = (StateImpl) oldState; GuardedAction ta = new GuardedAction(action, newState); oldStateImpl.addGuardedAction(input, ta); return this; }
public StateEngine add(State oldState, Input input, Guard guard, Action action, State newState) throws IllegalArgumentException, IllegalStateException { mustBeInitializing(); StateImpl oldStateImpl = (StateImpl) oldState; GuardedAction ga = new GuardedAction(guard, action, newState); oldStateImpl.addGuardedAction(input, ga); return this; }