Class LiteralTerm<T>

java.lang.Object
org.jreliability.booleanfunction.common.LiteralTerm<T>
Type Parameters:
T - the type of the variable
All Implemented Interfaces:
Term

public class LiteralTerm<T> extends Object implements Term
The LiteralTerm represents a literal, i.e. the used variable. A LiteralTerm equals another LiteralTerm if their variables are equal.
  • Field Details

    • variable

      protected final T variable
      The variable or literal.
  • Constructor Details

    • LiteralTerm

      public LiteralTerm(T variable)
      Constructs a LiteralTerm with a given variable.
      Parameters:
      variable - the variable
  • Method Details

    • get

      public T get()
      Returns the variable.
      Returns:
      the variable
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object