Class StringTerm

  • All Implemented Interfaces:
    LogicStructure, Term<java.lang.String>
    Direct Known Subclasses:
    Constant, Variable

    public abstract class StringTerm
    extends TermAdapter<java.lang.String>
    This class represents terms which are objects identified by a string. Subclasses are Variable and Constant.
    Author:
    Tim Janus, Thomas Vengels
    • Constructor Summary

      Constructors 
      Constructor Description
      StringTerm​(java.lang.String value)
      Ctor: Creates a string term with the given String as value, uses the Sort "Thing"
      StringTerm​(java.lang.String value, Sort sort)
      Ctor: Create a string term with the given value and sort.
      StringTerm​(StringTerm other)
      Copy-Ctor: Creates a deep copy of the StringTerm
    • Method Summary

      Modifier and Type Method Description
      java.lang.String get()  
      abstract void set​(java.lang.String value)
      Changes the java-object representation of the term to the given value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • StringTerm

        public StringTerm​(java.lang.String value)
        Ctor: Creates a string term with the given String as value, uses the Sort "Thing"
        Parameters:
        value - The value for the string term.
      • StringTerm

        public StringTerm​(java.lang.String value,
                          Sort sort)
        Ctor: Create a string term with the given value and sort.
        Parameters:
        value - The value of for the string term.
        sort - The sort representing the type of the StringTerm.
      • StringTerm

        public StringTerm​(StringTerm other)
        Copy-Ctor: Creates a deep copy of the StringTerm
        Parameters:
        other - The StringTerm that acts as source for the copy
    • Method Detail

      • set

        public abstract void set​(java.lang.String value)
        Description copied from interface: Term
        Changes the java-object representation of the term to the given value.
        Specified by:
        set in interface Term<java.lang.String>
        Overrides:
        set in class TermAdapter<java.lang.String>
        Parameters:
        value - The new java-object representation of the term.
      • get

        public java.lang.String get()
        Specified by:
        get in interface Term<java.lang.String>
        Overrides:
        get in class TermAdapter<java.lang.String>
        Returns:
        the java-object representation of the term.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class TermAdapter<java.lang.String>