Class TwoArgFunction

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Direct Known Subclasses:
BaseLib, BaseLib.error, Bit32Lib, Bit32Lib.Bit32Lib2, CoroutineLib, DebugLib, DebugLib.setmetatable, IoLib, JseMathLib.atan2, JseMathLib.log, MathLib, MathLib.BinaryOp, MathLib.fmod, OsLib, PackageLib, StringLib, TableLib

public abstract class TwoArgFunction extends LibFunction
Abstract base class for Java function implementations that take two arguments and return one value.

Subclasses need only implement LuaValue.call(LuaValue,LuaValue) to complete this class, simplifying development. All other uses of call(), invoke(Varargs),etc, are routed through this method by this class, dropping or extending arguments with nil values as required.

If more or less than two arguments are required, or variable argument or variable return values, then use one of the related function ZeroArgFunction, OneArgFunction, ThreeArgFunction, or VarArgFunction.

See LibFunction for more information on implementation libraries and library functions.

See Also: