public abstract class PLTerm
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static PLTerm |
fail
Fail representation.
|
static PLTerm |
nil
Empty list representation.
|
static PLTerm |
success
Success representation.
|
Constructor and Description |
---|
PLTerm() |
Modifier and Type | Method and Description |
---|---|
abstract PLTerm |
copy()
Duplication of Prolog terms.
|
abstract boolean |
equals(PLTerm t)
Comparison between Prolog terms.
|
boolean |
isAtom()
Atom test.
|
boolean |
isFloat()
Float test.
|
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.
|
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.public abstract java.lang.String toString()
toString
in class java.lang.Object
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 isAtom()
true
if this Prolog term is an atom;
false
otherwise.public boolean isFloat()
true
if this Prolog term is a float;
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.