====== Term ======
''**public class Term**'' \\
''**implements Serializable**''\\
Class for the definition a Term. Term managing all the functions for Terms.\\
{{ :magik-demo:developer:schema2.png?nolink&600 |}}
Term essentially is a String that can be:
* //Variable// -> It must start with an **upper case** character (e.g. X, Y, Z)
* //Constant// -> It must be define inside **single quotes** (e.g. 'Florence', 'florence')
===== Class Attributes =====
private java.lang.String term
===== Class Constructor =====
==== Term ====
public Term (java.lang.String t)
Constructor.\\
//Called by://
* it.unibz.inf.magik.core.Atom
* it.unibz.inf.magik.core.TCSuggestions
* it.unibz.inf.magik.core.AuxiliaryFunctions
* it.unibz.inf.magik.additional.Comparison
* it.unibz.inf.magik.test.TestAtomClass
* it.unibz.inf.magik.test.TestTCQCReasonerBlackWhiteExample
* it.unibz.inf.magik.test.TestTCQCReasonerPlainCompanyEx
* it.unibz.inf.magik.test.TestTermClass
* it.unibz.inf.magik.test.TestTCQCReasonerUnderFC
**Parameters:**
* t - term
===== Class Methods =====
==== applySubstitution ====
public static java.util.ArrayList applySubstiution (java.util.ArrayList terms,
java.util.HashMap substitution)
Apply to the terms substitution.
**Parameters:**
* terms - original terms
* substitution - terms that has to be substitute
**Returns:**
* java.util.ArrayList of the substituted terms
----
==== applySubstitution ====
public static Term applySubstiution (Term term,
java.util.HashMap substitution)
Apply to a term substitution.
**Parameters:**
* term - original term
* substitution - terms that has to be substitute
**Returns:**
* term with substitutions
----
==== isVariable ====
public static boolean isVariable ()
Check if the term is a variable.\\
**Returns:**
* //true//, if the term is a variable, //false// otherwise
----
==== isConstant ====
public static boolean isConstant ()
Check if the term is a constant.\\
**Returns:**
* //true//, if the term is a constant, //false// otherwise
----
==== clone ====
@Override
public Object clone ()
**Returns:**
* cloned object (Term type)
----
==== equals ====
@Override
public boolean equals (Object o)
Implementation for checking the equality for Term
**Returns:**
* //true// if equal, //false// otherwise
----
==== toString ====
@Override
public String toString ()
Implementation for converting in String format Term.\\
This because it has to be respect the variable or constant format.
**Returns:**
* String version of the Term
----
==== getters and setters methods ====
public java.lang.getTerm()
public void setTerm(java.lang.String term)
[[magik-demo:developer:class:core:term|Back to Top]] | [[magik-demo:start|Back to Home Page]]