|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.functions.Function
org.millscript.millscript.functions.BinaryFunction
public abstract class BinaryFunction
This class the common functionality required for a two argument function which returns a single result. This class allows simple binary functions to be implemented very easily.
| Constructor Summary | |
|---|---|
BinaryFunction()
|
|
BinaryFunction(Package p)
|
|
| Method Summary | |
|---|---|
void |
apply(Machine mc,
int nargs)
Performs this function using the specified machine, with the specified number of arguments. |
abstract java.lang.Object |
apply2(java.lang.Object a1,
java.lang.Object a2)
Returns the result of this function when applied to the two specified arguments. |
| Methods inherited from class org.millscript.millscript.functions.Function |
|---|
applyUpdater, checkNargs, checkNargsGT, checkUNargs, getName, modName, reportNargsError, reportNargsGTError, setName, toString, tryClone |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BinaryFunction()
Function.Function()public BinaryFunction(Package p)
Function.Function(Package)| Method Detail |
|---|
public void apply(Machine mc,
int nargs)
Function
apply in class Functionmc - the machine to perform this function onnargs - the number of arguments the function is being invoked withFunction.apply(org.millscript.millscript.vm.Machine, int)
public abstract java.lang.Object apply2(java.lang.Object a1,
java.lang.Object a2)
a1 - the first argument to the functiona2 - the second argument to the function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||