Class OneArgFunction

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Direct Known Subclasses:
MathLib.randomseed, MathLib.UnaryOp, PackageLib.require, ScriptManager.luaGetCanonicalClassName, ScriptManager.luaGetClassName, ScriptManager.luaGetFields, ScriptManager.luaGetMethods, ScriptManager.luaIsAccessible, StringLib.len, StringLib.lower, StringLib.reverse, StringLib.trim, StringLib.upper

public abstract class OneArgFunction extends LibFunction
Abstract base class for Java function implementations that take one argument and return one value.

Subclasses need only implement LuaValue.call(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 than one argument are required, or no arguments are required, or variable argument or variable return values, then use one of the related function ZeroArgFunction, TwoArgFunction, ThreeArgFunction, or VarArgFunction.

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

See Also: