jadex.rules.eca.ICondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-rules-eca Show documentation
Show all versions of jadex-rules-eca Show documentation
Small Java annotation-based event-condition-action rule engine.
package jadex.rules.eca;
import jadex.commons.Tuple2;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
/**
* Interface for a condition part of a rule.
*/
public interface ICondition
{
public static Tuple2 TRUE = new Tuple2(Boolean.TRUE, null);
public static Tuple2 FALSE = new Tuple2(Boolean.FALSE, null);
public static ICondition TRUE_CONDITION = new ICondition()
{
public IFuture> evaluate(IEvent event)
{
return new Future>(TRUE);
}
};
// /**
// * Evaluation the condition.
// * @param event The event.
// * @return True, if condition is met (plus additional user data).
// */
// public Tuple2 evaluate(IEvent event);
/**
* Evaluation the condition.
* @param event The event.
* @return True, if condition is met (plus additional user data).
*/
public IFuture> evaluate(IEvent event);
}