|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCiaoJava.PLTerm
CiaoJava.PLAtom
Prolog atom representation. This class is used to represent Prolog atoms and empty lists (The empty list [] is represented in Prolog and in the fast_read/fast_write format as an atom). This class does not represent numeric atoms; use instead PLInteger and PLFloat classes.
Field Summary |
Fields inherited from class CiaoJava.PLTerm |
fail, nil, success |
Constructor Summary | |
PLAtom(java.lang.String name)
Atom constructor. |
Method Summary | |
PLTerm |
copy()
Makes a full copy of this PLAtom object. |
boolean |
equals(PLTerm term)
comparison between Prolog terms. |
java.lang.String |
getName()
Gets the name of this atom as a string. |
boolean |
isRunnable()
Execution test on Prolog objects. |
java.lang.Object |
javaRepr()
Gets the Java representation of the atom as an object (a String object). |
java.lang.Object |
javaRepr(CiaoJava.PLInterpreter i)
Gets the Java representation of the atom as an object. |
java.lang.String |
toString()
String representation of a Prolog atom. |
Methods inherited from class CiaoJava.PLTerm |
isInteger, isList, isNil, isString, isStructure, isVariable, unify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PLAtom(java.lang.String name)
name
- Name of the Prolog atom.Method Detail |
public java.lang.String toString()
toString
in class PLTerm
String
representation of this atom.public java.lang.Object javaRepr(CiaoJava.PLInterpreter i)
javaRepr
in class PLTerm
i
- PLInterpreter
object representing a Prolog
to Java interpreter. Although is not used in this class,
is included to implement the same method of class
PLTerm
.
Object
with the name of this Prolog atom.public java.lang.Object javaRepr()
Object
with the name of this Prolog atom.public java.lang.String getName()
String
with the name of this atom.public boolean isRunnable()
PLTerm
.
isRunnable
in class PLTerm
public boolean equals(PLTerm term)
equals
in class PLTerm
term
- The PLTerm
object to compare with this object.
true
if the term received as argument is similar to this
atom: is a PLAtom
object and has the same
atom name;
false otherwise.public PLTerm copy()
PLAtom
object. Creates
a new PLAtom
object with the name equals to this
object name.
copy
in class PLTerm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |