Try:

Boolean ret = new Boolean(true);
return new Value( ret, RU.EXTERNAL_ADDRESS );

Jess does not have a boolean in it's type system like it does for int and
long. It does have the generic EXTERNAL_ADDRESS which can be any Object
including Boolean. See the javadoc for the class RU or RU.java or
Value.java.

Note that in some cases jess performs type conversions so be careful where
and how you use the RU.EXTERNAL_ADDRESS Value objects.

Ernest, any chance for RU.BOOLEAN and a BooleanValue class?

Good luck!

alan


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Mahesh Gandhe
Sent: Tuesday, November 27, 2001 12:51 PM
To: [EMAIL PROTECTED]
Subject: JESS: java.lang.Boolean to Jess Boolean


hi ,
I am writing the java code for the method so that
the method could be invoked in the command line in jess.
The code is as follows
import jess.*;
import java.lang.*;
public class GreaterThan implements Userfunction
 {
   public String getName() { return "my-upcase";}
   public Value call (ValueVector vv ,Context context) throws JessException
    {

         Boolean ret = new Boolean (true);
         return new Value (ret,'TRUE');
     }

}
}
During compilation it giving error stating that 'TRUE' is not a data type.
can some body tell me how to construct the new JessValue object of
type java.lang.Boolean.

Regards,
Mahesh G.






Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.


--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to