This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
magik-demo:developer:class:core:term [2013/07/18 11:53] alex [applySubstitution] |
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 58: | Line 61: | ||
| java.util.HashMap<Term,Term> substitution) | java.util.HashMap<Term,Term> substitution) | ||
| </code> | </code> | ||
| - | Apply to a term substitution.\\ | + | Apply to a term substitution. |
| **Parameters:** | **Parameters:** | ||
| * term - original term | * term - original term | ||
| Line 91: | Line 95: | ||
| ---- | ---- | ||
| + | ==== 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]] | ||