|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCiaoJava.PLTerm
Java representation of Prolog terms. Abstract class for representing generic Prolog terms. The rest of the term representation classes are childs of this one. This class contains data and code that are common to every term. It includes also the conversion mechanism between the Java representation of Prolog terms and the serialized representation received from Prolog.
Field Summary | |
static PLTerm |
fail
Fail representation. |
static PLTerm |
nil
Empty list representation. |
static PLTerm |
success
Success representation. |
Constructor Summary | |
PLTerm()
|
Method Summary | |
abstract PLTerm |
copy()
Duplication of Prolog terms. |
abstract boolean |
equals(PLTerm t)
Comparison between Prolog terms. |
boolean |
isInteger()
Integer test. |
boolean |
isList()
List test. |
boolean |
isNil()
Nil test. |
abstract boolean |
isRunnable()
Execution test for Prolog objects. |
boolean |
isString()
String test. |
boolean |
isStructure()
Structure test. |
boolean |
isVariable()
Variable test. |
abstract java.lang.Object |
javaRepr(CiaoJava.PLInterpreter i)
Java representation of the Prolog term. |
abstract java.lang.String |
toString()
String representation of the Prolog term. |
boolean |
unify(PLTerm term)
Term unification. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final PLTerm nil
PLTerm
constant
represents the empty list.
public static final PLTerm success
PLAtom
constant
is used to send back to Prolog if a request with no
return value has been successfully completed.
public static final PLTerm fail
PLAtom
constant
is used to send back to Prolog if a request has
failed.
Constructor Detail |
public PLTerm()
Method Detail |
public abstract java.lang.String toString()
String
representing this term.public abstract java.lang.Object javaRepr(CiaoJava.PLInterpreter i)
i
- PLInterpreter
object used
to interpret the Prolog representation
of Java objects.
public abstract boolean isRunnable()
true
if this Prolog term can
be evaluated in the Prolog side as a goal;
false
otherwise.public abstract boolean equals(PLTerm t)
t
- Term to be compared to.
true
if this Prolog term is
equal to the term received as argument;
false
otherwise.public abstract PLTerm copy()
PLList
, PLStructure
and PLVariable
clases perform the
duplication recursively.
public boolean unify(PLTerm term)
term
- Term to unify with.
public boolean isVariable()
true
if this Prolog term is a variable;
false
otherwise.public boolean isStructure()
true
if this Prolog term is a structure;
false
otherwise.public boolean isList()
true
if this Prolog term is a list;
false
otherwise.public boolean isString()
true
if this Prolog term is a string;
false
otherwise.public boolean isNil()
true
if this Prolog term is nil;
false
otherwise.public boolean isInteger()
true
if this Prolog term is an integer;
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |