sleep.bridges
Class BasicStrings

java.lang.Object
  extended by sleep.bridges.BasicStrings
All Implemented Interfaces:
Loadable, Predicate

public class BasicStrings
extends java.lang.Object
implements Loadable, Predicate

provides basic string parsing facilities


Constructor Summary
BasicStrings()
           
 
Method Summary
 boolean decide(java.lang.String n, ScriptInstance i, java.util.Stack l)
          decides the truthfulness of the proposition predicateName applied to the passedInTerms.
 void scriptLoaded(ScriptInstance aScript)
          called when a script is loaded
 void scriptUnloaded(ScriptInstance aScript)
          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

BasicStrings

public BasicStrings()
Method Detail

scriptUnloaded

public void scriptUnloaded(ScriptInstance aScript)
Description copied from interface: Loadable
called when a script is unloaded

Specified by:
scriptUnloaded in interface Loadable

scriptLoaded

public void scriptLoaded(ScriptInstance aScript)
Description copied from interface: Loadable
called when a script is loaded

Specified by:
scriptLoaded in interface Loadable

decide

public boolean decide(java.lang.String n,
                      ScriptInstance i,
                      java.util.Stack l)
Description copied from interface: Predicate
decides the truthfulness of the proposition predicateName applied to the passedInTerms.

Specified by:
decide in interface Predicate
Parameters:
n - a predicate i.e. ==
i - an instance of the script asking about this predicate.
l - a stack of terms i.e. [3, 4]. These arguments are passed in REVERSE ORDER i.e. [right hand side, left hand side]
Returns:
a boolean, in the case of a predicate == and the terms [3, 4] we know 3 == 4 is false so return false.