|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--CiaoJava.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 | |
(package private) java.lang.Double |
Value
Value of this Prolog float. |
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(PLInterpreter i)
Java representation of a Prolog float. |
protected int |
numberOfCells()
Not implemented. |
java.lang.String |
toString()
String representation of a Prolog float. |
Methods inherited from class CiaoJava.PLTerm |
backtrack,
fastRead,
fastWrite,
genPrefix,
genTerm,
getChar,
getFloat,
getInt,
getPrefix,
getString,
getTerm,
isException,
isList,
isNil,
isPrologFail,
isPrologSuccess,
isQueryId,
isSolution,
isString,
isStructure,
isVariable,
launchGoal,
unify |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.Double Value
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()
public java.lang.Object javaRepr(PLInterpreter i)
Double
object that contains the Prolog float.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 double getValue()
double
.PLFloat
as a Java
double
.public boolean isRunnable()
PLTerm
class.false
.public boolean equals(PLTerm t)
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.PLFloat
object.protected int numberOfCells()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |