Class Fact<T>

  • Type Parameters:
    T - type of the fact
    Direct Known Subclasses:
    BrainFact

    public class Fact<T>
    extends java.lang.Object
    A class representing a named fact. Facts have unique names within a Facts instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      Fact​(java.lang.String name, T value)
      Create a new fact.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getName()
      Get the fact name.
      T getValue()
      Get the fact value.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Fact

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

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getName

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

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object