Re: JESS: Object to built-in type

2005-11-18 Thread Roger Studner
You can use instance of, do a cast, and then contruct the right Value (or LongValue in the case of a Long/long) and then set a slot with that value. Source code examples help, so here ya go: public static void insertFactFromTemplateNameAndSlotValueMap(Rete engine, Deftemplate t, String

Re: JESS: Object to built-in type

2005-11-18 Thread ejfried
I think Roger Studner wrote: v = new Value(l, RU.SYMBOL); ... v = new Value(i, RU.SYMBOL); For the record, note that both of these lines will throw exceptions at runtime. To contstruct an RU.SYMBOL from a numeric type, you have to convert the value to a String yourself and pass that String to

Re: JESS: Object to built-in type

2005-11-18 Thread Yura
Thanks a lot - intValue works fine. Yuri