public class

OrCondition

extends Object
implements TransitionCondition
java.lang.Object
   ↳ uk.ac.imperial.presage2.util.fsm.OrCondition

Class Overview

TransitionCondition which does a boolean OR of all the conditions given to it and returns that result.

Summary

[Expand]
Inherited Constants
From interface uk.ac.imperial.presage2.util.fsm.TransitionCondition
Public Constructors
OrCondition(TransitionCondition... conditions)
Public Methods
boolean allow(Object event, Object entity, State state)
Test whether this state transition is allowed given the event object and current state.
[Expand]
Inherited Methods
From class java.lang.Object
From interface uk.ac.imperial.presage2.util.fsm.TransitionCondition

Public Constructors

public OrCondition (TransitionCondition... conditions)

Parameters
conditions TransitionCondition to OR together.

Public Methods

public boolean allow (Object event, Object entity, State state)

Test whether this state transition is allowed given the event object and current state.

Parameters
event The event which is being applied on the state machine.
entity Entity associated with this state machine.
state Current state of the FSM.
Returns
  • true if this transition is allowed from state given event