mess
Class JessHelper

java.lang.Object
  |
  +--mess.JessHelper

public class JessHelper
extends Object

A bunch of static tools to help you with Jess/Java conectivity


Constructor Summary
JessHelper()
           
 
Method Summary
static Object castValue(Value v, Context c)
          Casts a JESS Value into the most appropriate Java class
static int getSlotIntValue(Fact f, String slotName, Context c)
           
static int getSlotIntValue(Fact f, String slotName, Rete rete)
           
static Object getSlotValue(Fact f, String slotName, Context c)
          Helps you get a nicely cast value out of a slot in your fact
static Object getSlotValue(Fact f, String slotName, Rete rete)
          Helps you get a nicely cast value out of a slot in your fact
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JessHelper

public JessHelper()
Method Detail

castValue

public static Object castValue(Value v,
                               Context c)
Casts a JESS Value into the most appropriate Java class
Parameters:
v - a JESS Value object

getSlotValue

public static Object getSlotValue(Fact f,
                                  String slotName,
                                  Rete rete)
Helps you get a nicely cast value out of a slot in your fact
Parameters:
f - a Jess fact
slotName - name of the slot
rete - rete engine
Returns:
a nicely cast value of the slot or null if anything goes wrong

getSlotValue

public static Object getSlotValue(Fact f,
                                  String slotName,
                                  Context c)
Helps you get a nicely cast value out of a slot in your fact
Parameters:
f - a Jess fact
slotName - name of the slot
c - Jess context
Returns:
a nicely cast value of the slot or null if anything goes wrong

getSlotIntValue

public static int getSlotIntValue(Fact f,
                                  String slotName,
                                  Rete rete)

getSlotIntValue

public static int getSlotIntValue(Fact f,
                                  String slotName,
                                  Context c)