User Tools

Site Tools


Writing /home/academic/ogsavkovic/public_html/wiki/data/cache/f/f602d4ff6b15482ef0a4c6137f8f8a94.metadata failed
magik-demo:developer:class:core:term

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
magik-demo:developer:class:core:term [2013/07/18 10:48]
alex [Term]
magik-demo:developer:class:core:term [2017/07/06 15:24] (current)
Line 5: Line 5:
  
 Class for the definition a Term. Term managing all the functions for Terms.\\ 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: Term essentially is a String that can be:
   * //​Variable//​ -> It must start with an **upper case** character (e.g. X, Y, Z)    * //​Variable//​ -> It must start with an **upper case** character (e.g. X, Y, Z) 
Line 22: Line 25:
 </​code>​ </​code>​
 Constructor.\\ Constructor.\\
 +
 //Called by:// //Called by://
   * it.unibz.inf.magik.core.Atom   * it.unibz.inf.magik.core.Atom
Line 36: Line 40:
 ===== Class Methods ===== ===== Class Methods =====
  
 +==== applySubstitution ====
 +<code java>
 +public static java.util.ArrayList<​Term>​ applySubstiution (java.util.ArrayList<​Term>​ terms, ​
 +                                                          java.util.HashMap<​Term,​Term>​ substitution) ​
 +</​code>​
 +Apply to the terms substitution.
 +
 +**Parameters:​**
 +  * terms - original terms
 +  * substitution - terms that has to be substitute
 +**Returns:​**
 +  * java.util.ArrayList<​Term>​ of the substituted terms
 + 
 +
 +----
 +
 +==== applySubstitution ====
 +<code java>
 +public static Term applySubstiution (Term term, 
 +                                     ​java.util.HashMap<​Term,​Term>​ substitution) ​
 +</​code>​
 +Apply to a term substitution.
 +
 +**Parameters:​**
 +  * term - original term
 +  * substitution - terms that has to be substitute
 +**Returns:​**
 +  * term with substitutions
 + 
 +
 +----
 +
 +==== isVariable ====
 +<code java>
 +public static boolean isVariable () 
 +</​code>​
 +Check if the term is a variable.\\
 +
 +**Returns:​**
 +  * //true//, if the term is a variable, //false// otherwise
 +
 +
 +----
 +
 +==== isConstant ====
 +<code java>
 +public static boolean isConstant () 
 +</​code>​
 +Check if the term is a constant.\\
 +
 +**Returns:​**
 +  * //true//, if the term is a constant, //false// otherwise
 +
 +
 +----
 +==== clone ====
 +<code java>
 +@Override
 +public Object clone () 
 +</​code>​
 +
 +**Returns:​**
 +  * cloned object (Term type)
 +
 +
 +----
 +
 +==== equals ====
 +<code java>
 +@Override
 +public boolean equals (Object o) 
 +</​code>​
 +
 +Implementation for checking the equality for Term
 +
 +**Returns:​**
 +  * //true// if equal, //false// otherwise
 +
 +
 +----
 +
 +==== toString ====
 +<code java>
 +@Override
 +public String toString () 
 +</​code>​
 +
 +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 ====
 +<code java>
 +public java.lang.getTerm() ​
 +public void setTerm(java.lang.String term) 
 +</​code>​
 +
 +[[magik-demo:​developer:​class:​core:​term|Back to Top]] | [[magik-demo:​start|Back to Home Page]]
magik-demo/developer/class/core/term.1374137299.txt.gz ยท Last modified: 2017/07/06 15:24 (external edit)