|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jess.Deffunction
Class used to represent Deffunctions (functions defined in the Jess language). Note that you can create these form Java code and add them to a Rete engine using Rete.addUserfunction.
(C) 1998 E.J. Friedman-Hill and the Sandia Corporation
Constructor Summary | |
Deffunction(java.lang.String name,
java.lang.String docstring)
Create a deffunction |
Method Summary | |
void |
addAction(Funcall fc)
Add an action to this deffunction. |
void |
addArgument(java.lang.String name,
int type)
Add a formal argument to this deffunction. |
void |
addValue(Value val)
Add a simple value to this deffunction. |
Value |
call(ValueVector call,
Context context)
Execute this deffunction. |
java.lang.String |
getDocstring()
Fetch the documentation string of this Deffunction |
java.lang.String |
getName()
Fetch the name of this Deffunction |
void |
setDocstring(java.lang.String ds)
Set the documentation string of this Deffunction |
java.lang.String |
toString()
Describe myself |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Deffunction(java.lang.String name, java.lang.String docstring)
name
- the name of the deffunctiondocstring
- the documentation stringMethod Detail |
public final java.lang.String getName()
public final java.lang.String getDocstring()
public final void setDocstring(java.lang.String ds)
ds
- The documentation stringpublic void addArgument(java.lang.String name, int type) throws JessException
name
- A name for the variable (without the leading '?')type
- RU.MULTIVARIABLE or RU.VARIABLEpublic void addAction(Funcall fc) throws JessException
fc
- The actionpublic void addValue(Value val)
val
- The valuepublic Value call(ValueVector call, Context context) throws JessException
call
- The ValueVector form of the function call used to invoke this deffunction.c
- The execution contextpublic java.lang.String toString()
|
© 1997 E.J. Friedman-Hill and Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |