User Tools

Site Tools


magik-demo:developer:class:core:atom

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:atom [2013/07/18 14:20]
alex [parseAtoms]
magik-demo:developer:class:core:atom [2017/07/06 15:24] (current)
Line 5: Line 5:
  
 Class for the definition an Atom. Atom managing all the functions for atoms.\\ Class for the definition an Atom. Atom managing all the functions for atoms.\\
 +
 +{{ :​magik-demo:​developer:​schema2.png?​nolink&​600 |}} 
 +
  
 ===== Class Attributes ===== ===== Class Attributes =====
Line 14: Line 17:
 </​code>​ </​code>​
  
-===== Class Constructor ​=====+===== Class Constructors ​=====
  
 ==== Atom ==== ==== Atom ====
Line 199: Line 202:
  
 ---- ----
-==== isVariable ​====+ 
 +==== getConstants ​====
 <code java> <code java>
-public ​static boolean isVariable ​() +public ​java.util.ArrayList<​Term>​ getConstants() 
 </​code>​ </​code>​
-Check if the term is a variable.\\+ 
 +Gives all constants that occur in the atom
  
 **Returns:​** **Returns:​**
-  * //true//, if the term is a variable, //false// otherwise+  * list of the constants
  
  
 ---- ----
  
-==== isConstant ​====+==== getVariables ​====
 <code java> <code java>
-public ​static boolean isConstant ​() +public ​java.util.ArrayList<​Term>​ getVariables() 
 </​code>​ </​code>​
-Check if the term is a constant.\\+ 
 +Gives all variables that occur in the atom
  
 **Returns:​** **Returns:​**
-  * //true//, if the term is a constant, //false// otherwise+  * list of the variables
  
  
 ---- ----
 +==== isContainingTerm ====
 +<code java>
 +public static boolean isContainingTerm (Term term) 
 +</​code>​
 +Check if the Atom contains a term.
 +
 +**Parameters:​**
 +  * term - term that we want to find
 +**Returns:​**
 +  * //true//, if the atom contains the term , //false// otherwise
 +
 +
 +----
 +
 +==== replaceTerm ====
 +<code java>
 +public void replaceTerm(java.lang.String oldTerm, ​
 +                        java.lang.String newTerm)
 +</​code>​
 +Replace term with a new string (if old string is found in the atom).
 +
 +**Parameters:​**
 +  * oldTerm - the term that is candidated to be replace
 +  * newTerm - the new term
 +
 +
 +----
 +==== clone ====
 +<code java>
 +@Override
 +public Object clone () 
 +</​code>​
 +
 +**Returns:​**
 +  * cloned object (Atom type)
 +
 +
 +----
 +
 +==== equals ====
 +<code java>
 +@Override
 +public boolean equals (Object o) 
 +</​code>​
 +
 +Implementation for checking the equality for Atom
 +
 +**Returns:​**
 +  * //true// if equal, //false// otherwise
 +
 +
 +----
 +
 +==== toString ====
 +<code java>
 +@Override
 +public String toString () 
 +</​code>​
 +
 +Implementation for converting in String format Atom. 
 +
 +**Returns:​**
 +  * String version of the atom
 +
 +----
 +
 +==== getters and setters methods ====
 +<code java>
 +public long getAtomId()
 +public void setAtomId(long atomId) ​
 +
 +public java.lang.String getAtomName() ​
 +public void setAtomName(java.lang.StringString atomName) ​
 +
 +public java.util.StringArrayList<​Term>​ getTerms() ​
 +public void setTerms(java.util.ArrayList<​Term>​ terms) ​
 +
 +</​code>​
 +
 +[[magik-demo:​developer:​class:​core:​atom|Back to Top]] | [[magik-demo:​start|Back to Home Page]]
magik-demo/developer/class/core/atom.1374150003.txt.gz · Last modified: 2017/07/06 15:24 (external edit)