Class Terms


  • public class Terms
    extends Object
    Terms is a utility class that provides static convenience methods for the construction of Terms. Terms also provides a convenience interface for converting String in the TermLanguage to trees of Terms
    Author:
    djl 2009.08.31
    • Constructor Detail

      • Terms

        public Terms()
    • Method Detail

      • newTerm

        public static Term newTerm​(String sFunctor)
        Construct a new TermNode with the given functor.
        Parameters:
        sFunctor - the functor for the Term
        Returns:
        a term tree
      • newTerm

        public static Term newTerm​(String sFunctor,
                                   Term[] aTerms)
        Construct a new TermNode with the given functor and given Terms.
        Parameters:
        sFunctor - the functor for the Term
        aTerms - an children of the node
        Returns:
        a term tree
      • newTerm

        public static Term newTerm​(String sFunctor,
                                   Term t1)
        Construct a new TermNode with the given functor and given Terms.
        Parameters:
        sFunctor - the functor for the Term
        t1 - a child term
        Returns:
        a term tree
      • newTerm

        public static Term newTerm​(String sFunctor,
                                   Term t1,
                                   Term t2)
        Construct a new TermNode with the given functor and given Terms.
        Parameters:
        sFunctor - the functor for the Term
        t1 - a child term
        t2 - a child term
        Returns:
        a term tree
      • newTerm

        public static Term newTerm​(String sFunctor,
                                   Term t1,
                                   Term t2,
                                   Term t3)
        Construct a new TermNode with the given functor and given Terms.
        Parameters:
        sFunctor - the functor for the Term
        t1 - a child term
        t2 - a child term
        t3 - a child term
        Returns:
        a term tree
      • newTerm

        public static Term newTerm​(String sFunctor,
                                   Term t1,
                                   Term t2,
                                   Term t3,
                                   Term t4)
        Construct a new TermNode with the given functor and given Terms.
        Parameters:
        sFunctor - the functor for the Term
        t1 - a child term
        t2 - a child term
        t3 - a child term
        t4 - a child term
        Returns:
        a term tree
      • newTerm

        public static Term newTerm​(String sFunctor,
                                   Term t1,
                                   Term t2,
                                   Term t3,
                                   Term t4,
                                   Term t5)
        Construct a new TermNode with the given functor and given Terms.
        Parameters:
        sFunctor - the functor for the Term
        t1 - a child term
        t2 - a child term
        t3 - a child term
        t4 - a child term
        t5 - a child term
        Returns:
        a term tree
      • create

        public static Term create​(String s)
        Create a Tree of Terms using the Term Language in the given String
        Parameters:
        s - String representing a Term tree
        Returns:
        a term tree
      • create

        public static Term create​(String s,
                                  CoherenceQueryLanguage language)
        Create a Tree of Terms using the Term Language in the given String
        Parameters:
        s - String representing a Term tree
        Returns:
        a term tree