upgrade JPL
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1936 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
//*****************************************************************************/
|
||||
// Project: jpl
|
||||
//
|
||||
// File: $Id: Float.java,v 1.1 2004-08-27 20:27:56 vsc Exp $
|
||||
// Date: $Date: 2004-08-27 20:27:56 $
|
||||
// File: $Id: Float.java,v 1.2 2007-09-27 15:25:32 vsc Exp $
|
||||
// Date: $Date: 2007-09-27 15:25:32 $
|
||||
// Author: Fred Dushin <fadushin@syr.edu>
|
||||
//
|
||||
//
|
||||
@@ -59,7 +59,7 @@ import jpl.fli.term_t;
|
||||
* GNU Library Public License for more details.<p>
|
||||
* </i><hr>
|
||||
* @author Fred Dushin <fadushin@syr.edu>
|
||||
* @version $Revision: 1.1 $
|
||||
* @version $Revision: 1.2 $
|
||||
* @see jpl.Term
|
||||
* @see jpl.Compound
|
||||
*/
|
||||
@@ -98,7 +98,16 @@ public class Float extends Term {
|
||||
* @return the ith argument (counting from 1) of this Float (never)
|
||||
*/
|
||||
public final Term arg(int i) {
|
||||
throw new JPLException("jpl.Float.arg(int) is undefined");
|
||||
throw new JPLException("jpl.Float#arg(int) is undefined");
|
||||
}
|
||||
|
||||
/**
|
||||
* The (nonexistent) args of this Float
|
||||
*
|
||||
* @return the (nonexistent) args of this Float
|
||||
*/
|
||||
public Term[] args() {
|
||||
return new Term[] {};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +143,7 @@ public class Float extends Term {
|
||||
* @return the name of this Float (never)
|
||||
*/
|
||||
public final String name() {
|
||||
throw new JPLException("jpl.Float.name() is undefined");
|
||||
throw new JPLException("jpl.Float#name() is undefined");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,6 +191,14 @@ public class Float extends Term {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public final int type() {
|
||||
return Prolog.FLOAT;
|
||||
}
|
||||
|
||||
public String typeName(){
|
||||
return "Float";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Prolog source text representation of this Float
|
||||
*
|
||||
@@ -201,28 +218,10 @@ public class Float extends Term {
|
||||
return this == obj || (obj instanceof Float && value == ((Float) obj).value);
|
||||
}
|
||||
|
||||
public final int type() {
|
||||
return Prolog.FLOAT;
|
||||
}
|
||||
|
||||
public String typeName(){
|
||||
return "Float";
|
||||
}
|
||||
|
||||
//==================================================================/
|
||||
// Methods (deprecated)
|
||||
//==================================================================/
|
||||
|
||||
/**
|
||||
* The (nonexistent) args of this Float
|
||||
*
|
||||
* @return the (nonexistent) args of this Float
|
||||
* @deprecated
|
||||
*/
|
||||
public Term[] args() {
|
||||
return new Term[] {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The immutable value of this jpl.Float object, as a Java double
|
||||
*
|
||||
@@ -270,7 +269,7 @@ public class Float extends Term {
|
||||
* @param term The Prolog term (a float) to convert
|
||||
* @return A new Float instance
|
||||
*/
|
||||
protected static Term getTerm(Map vars_to_Vars, term_t term) {
|
||||
protected static Term getTerm1(Map vars_to_Vars, term_t term) {
|
||||
DoubleHolder double_holder = new DoubleHolder();
|
||||
|
||||
Prolog.get_float(term, double_holder); // assume it succeeds...
|
||||
|
Reference in New Issue
Block a user