sleep.bridges
Class BasicNumbers
- Function, Loadable, Operator, Predicate, Serializable
public class BasicNumbers
provides some of the basic number crunching functionality
TYPE_DOUBLE
public static Class TYPE_DOUBLE
TYPE_INT
public static Class TYPE_INT
TYPE_LONG
public static Class TYPE_LONG
BasicNumbers
public BasicNumbers()
decide
public boolean decide(String n,
ScriptInstance i,
Stack l)
decides the truthfulness of the proposition predicateName applied to the passedInTerms.
- decide in interface Predicate
- a boolean, in the case of a predicate == and the terms [3, 4] we know 3 == 4 is false so return false.
operate
public Scalar operate(String o,
ScriptInstance i,
Stack locals)
apply operator operatorName on the values in the stack.
- operate in interface Operator
- a Scalar containing the result of the operatorName applied to the passedInLocals, in the case of "+" applied to [4, 3] we would get a Scalar containing the integer 7.