/** Return argument i as a boolean value, {@code defval} if nil, or throw a LuaError if any other type. * @param i the index of the argument to test, 1 is the first argument * @return true if argument i is boolean true, false if it is false, or defval if not supplied or nil * @exception LuaError if the argument is not a lua boolean * */ public boolean optboolean(int i, boolean defval) { return arg(i).optboolean(defval); }
/** Return argument i as a boolean value, {@code defval} if nil, or throw a LuaError if any other type. * @param i the index of the argument to test, 1 is the first argument * @return true if argument i is boolean true, false if it is false, or defval if not supplied or nil * @exception LuaError if the argument is not a lua boolean * */ public boolean optboolean(int i, boolean defval) { return arg(i).optboolean(defval); }
/** Return argument i as a boolean value, {@code defval} if nil, or throw a LuaError if any other type. * @param i the index of the argument to test, 1 is the first argument * @return true if argument i is boolean true, false if it is false, or defval if not supplied or nil * @exception LuaError if the argument is not a lua boolean * */ public boolean optboolean(int i, boolean defval) { return arg(i).optboolean(defval); }
Message(LuaValue data) { useDB = data.get("useDB").optboolean(false); lang = data.get("lang").optjstring("en"); keys = data.get("keys").opttable(new LuaTable()); params = data.get("params").opttable(new LuaTable()); rawMessage = data.get("rawMessage").optstring(LuaString.valueOf("")); }