Interface Condition

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Condition
This interface represents a rule's condition.
Author:
Mahmoud Ben Hassine ([email protected])
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Condition
    A NoOp Condition that always returns false.
    static final Condition
    A NoOp Condition that always returns true.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    evaluate(Facts facts)
    Evaluate the condition according to the known facts.
  • Field Details

  • Method Details

    • evaluate

      boolean evaluate(Facts facts)
      Evaluate the condition according to the known facts.
      Parameters:
      facts - known when evaluating the rule.
      Returns:
      true if the rule should be triggered, false otherwise