Class Fact<T>

java.lang.Object
org.jeasy.rules.api.Fact<T>
Type Parameters:
T - type of the fact

public class Fact<T> extends Object
A class representing a named fact. Facts have unique names within a Facts instance.
Author:
Mahmoud Ben Hassine
  • Constructor Details

    • Fact

      public Fact(String name, T value)
      Create a new fact.
      Parameters:
      name - of the fact
      value - of the fact
  • Method Details

    • getName

      public String getName()
      Get the fact name.
      Returns:
      fact name
    • getValue

      public T getValue()
      Get the fact value.
      Returns:
      fact value
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object