Class TermUtils


  • public class TermUtils
    extends java.lang.Object
    The TermUtils provides static methods for the Term class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Term getTermFromString​(java.lang.String string)
      Derives a Term from a given String.
      static <T> java.util.Set<T> getVariables​(Term term)
      Returns the variables included in a Term.
      static <T> void getVariables​(Term term, java.util.Set<T> set)
      Adds the variables included in a Term to a given set of variables.
      protected static Term parse​(java.lang.Object object)
      Parses a Term from a given helper Object that has been derived from the original String encoding the Term.
      protected static java.lang.Object toObject​(TermUtils.ParseString string)
      Transforms a given String to a helper Object that represents Terms as Lists of helper Objects and variables as Strings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getVariables

        public static <T> java.util.Set<T> getVariables​(Term term)
        Returns the variables included in a Term.
        Type Parameters:
        T - the type of the variables
        Parameters:
        term - the term
        Returns:
        the variables included in the term
      • getVariables

        public static <T> void getVariables​(Term term,
                                            java.util.Set<T> set)
        Adds the variables included in a Term to a given set of variables.
        Type Parameters:
        T - the type of the variables
        Parameters:
        term - the term
        set - the set of variables
      • getTermFromString

        public static Term getTermFromString​(java.lang.String string)
        Derives a Term from a given String.
        Parameters:
        string - the string encoding the term
        Returns:
        a term from a given string
      • parse

        protected static Term parse​(java.lang.Object object)
        Parses a Term from a given helper Object that has been derived from the original String encoding the Term.
        Parameters:
        object - the helper object
        Returns:
        a term from a given helper object
      • toObject

        protected static java.lang.Object toObject​(TermUtils.ParseString string)
        Transforms a given String to a helper Object that represents Terms as Lists of helper Objects and variables as Strings.
        Parameters:
        string - the string encoding the Term
        Returns:
        a helper object to parse the given string