Class LiteralTerm<T>

  • Type Parameters:
    T - the type of the variable
    All Implemented Interfaces:
    Term

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

      Fields 
      Modifier and Type Field Description
      protected T variable
      The variable or literal.
    • Constructor Summary

      Constructors 
      Constructor Description
      LiteralTerm​(T variable)
      Constructs a LiteralTerm with a given variable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      T get()
      Returns the variable.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • variable

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

      • LiteralTerm

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

      • get

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

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object