mess.extensions
Class Apply
java.lang.Object
|
+--mess.extensions.Apply
- public class Apply
- extends Object
- implements Userfunction
apply function will allow you to pass function names aroudn as
arguments; e.g.
(bind ?fn eq)
(if (apply (?fn ?arg1 ?arg2))
then .....
you can also use it in LHS of rules:
(defrule match
(property (value ?v1))
(property (value ?v2)
(equalFn ?eq))
(test (apply ?eq ?v1 ?v2))
=>
....
Thus we can have facts with customizable methods for various
things...
Constructor Summary |
Apply()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Apply
public Apply()
getName
public String getName()
- Specified by:
- getName in interface Userfunction
call
public Value call(ValueVector vv,
Context c)
throws JessException
- Specified by:
- call in interface Userfunction