|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCiaoJava.PLTerm
CiaoJava.PLFloat
This class represents the Prolog floats. Internally the Prolog floats are stored as double, to facilitate the conversion in the Java side.
Field Summary |
Fields inherited from class CiaoJava.PLTerm |
fail, nil, success |
Constructor Summary | |
PLFloat(double v)
Creates a new PLFloat object
with the given float value. |
Method Summary | |
PLTerm |
copy()
Makes a full copy of this PLFloat object. |
boolean |
equals(PLTerm t)
Comparison between Prolog terms. |
double |
getValue()
Returns the value of this Prolog float as a Java double . |
boolean |
isRunnable()
Execution test on Prolog objects. |
java.lang.Object |
javaRepr()
Java representation of a Prolog float. |
java.lang.Object |
javaRepr(CiaoJava.PLInterpreter i)
Java representation of a Prolog float. |
java.lang.String |
toString()
String representation of a Prolog float. |
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 PLFloat(double v)
PLFloat
object
with the given float value.
v
- double
value that will contain the new object.Method Detail |
public java.lang.String toString()
toString
in class PLTerm
public java.lang.Object javaRepr(CiaoJava.PLInterpreter i)
Double
object that contains the Prolog float.
javaRepr
in class PLTerm
i
- is the PLInterpreter instance used to translate
Prolog representations of Java objects. Although
this method makes no use of this argument, is
included to keep the declaration of this method
as abstract in class PLTerm
.
Object
instance that contains a
Double
object.public java.lang.Object javaRepr()
Double
object that contains the Prolog float.
Object
instance that contains a
Double
object.public double getValue()
double
.
PLFloat
as a Java
double
.public boolean isRunnable()
PLTerm
class.
isRunnable
in class PLTerm
false
.public boolean equals(PLTerm t)
equals
in class PLTerm
t
- Prolog term to compare to.
true
if the Prolog term received as
argument is equal to this PLFloat
<
false
otherwise.public PLTerm copy()
PLFloat
object.
Creates a new PLFloat
object with the
value of this object.
copy
in class PLTerm
PLFloat
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |