|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsleep.bridges.BasicUtilities
public class BasicUtilities
implementation of basic utility functions
| Constructor Summary | |
|---|---|
BasicUtilities()
|
|
| Method Summary | |
|---|---|
boolean |
decide(java.lang.String predName,
ScriptInstance anInstance,
java.util.Stack terms)
decides the truthfulness of the proposition predicateName applied to the passedInTerms. |
Scalar |
evaluate(java.lang.String n,
ScriptInstance i,
java.util.Stack l)
Evaluate a function and return the resulting scalar. |
boolean |
scriptLoaded(ScriptInstance i)
called when a script is loaded |
boolean |
scriptUnloaded(ScriptInstance i)
called when a script is unloaded |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicUtilities()
| Method Detail |
|---|
public boolean scriptUnloaded(ScriptInstance i)
Loadable
scriptUnloaded in interface Loadablepublic boolean scriptLoaded(ScriptInstance i)
Loadable
scriptLoaded in interface Loadable
public boolean decide(java.lang.String predName,
ScriptInstance anInstance,
java.util.Stack terms)
Predicate
decide in interface PredicatepredName - a predicate i.e. ==anInstance - an instance of the script asking about this predicate.terms - a stack of terms i.e. [3, 4]. These arguments are passed in REVERSE ORDER i.e. [right hand side, left hand side]
public Scalar evaluate(java.lang.String n,
ScriptInstance i,
java.util.Stack l)
Function
evaluate in interface Functionn - the function being called.i - an instance of the script calling this function.l - a stack containing the locals passed to this function. The locals are Scalar values passed in reverse order i.e. [arg n, arg n-1, ..., arg 1, arg 0]
SleepUtils.runCode(Function, String, ScriptInstance, Stack)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||