Class AbstractLogicalFunctionalTermImpl

java.lang.Object
fr.inria.rules.integraal.model.logicalElements.impl.functionalTerms.AbstractLogicalFunctionalTermImpl
All Implemented Interfaces:
fr.inria.rules.dlgpemodel.api.elems.ITerm, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, Standardizable, LogicalFunctionalTerm, Substitutable<Term>, Term, TermCompound, TermSequenceCompound
Direct Known Subclasses:
GroundFunctionalTermImpl, SpecializableLogicalFunctionalTermImpl

public abstract class AbstractLogicalFunctionalTermImpl extends Object implements LogicalFunctionalTerm
Common methods for the implementation of a FunctionalTerm
Author:
Federico Ulliana
  • Field Details

    • function_name

      protected final String function_name
      Name of the function symbol.
    • sub_terms

      protected final List<Term> sub_terms
      Ordered arguments of the function term.
  • Constructor Details

    • AbstractLogicalFunctionalTermImpl

      public AbstractLogicalFunctionalTermImpl(String function_name, List<Term> sub_terms)
      Default constructor
      Parameters:
      function_name - the name of the function to call
      sub_terms - the parameters of the function
  • Method Details

    • label

      public String label()
      //////////////////////////////////////////////
      Specified by:
      label in interface Term
      Returns:
      a string representation of this object
    • getFunctionName

      public String getFunctionName()
      Description copied from interface: LogicalFunctionalTerm
      Returns the function symbol of this term.
      Specified by:
      getFunctionName in interface LogicalFunctionalTerm
      Returns:
      a string representing the function name
    • getTermSequence

      public List<Term> getTermSequence()
      Description copied from interface: TermSequenceCompound
      Returns the direct term sequence of this compound.
      Specified by:
      getTermSequence in interface TermSequenceCompound
      Returns:
      the sequence of first level terms (i.e., all terms that are not themselves in a compound term) For instance, for p(a,g(b)), it returns a and g(b) but not b.
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object