Java Code Examples for org.luaj.vm2.LuaValue#checklong()
The following examples show how to use
org.luaj.vm2.LuaValue#checklong() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Utilities.java From Lukkit with MIT License | 6 votes |
/** * Gets the Java object from a LuaValue. * * @param value the LuaValue * @return the Java object */ public static Object getObjectFromLuavalue(LuaValue value) { if (value.istable()) { return convertTable(value.checktable()); } else if (value.isint()) { return value.checkint(); } else if (value.islong()) { return value.checklong(); } else if (value.isnumber()) { return value.checkdouble(); } else if (value.isstring()) { return value.checkjstring(); } else if (value.isboolean()) { return value.checkboolean(); } else if (value.isnil()) { return null; } else { return value.checkuserdata(); } }
Example 2
Source File: MathLib.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue arg) { long seed = arg.checklong(); random.random = new Random(seed); return NONE; }
Example 3
Source File: MathLib.java From XPrivacyLua with GNU General Public License v3.0 | 4 votes |
public LuaValue call(LuaValue arg) { long seed = arg.checklong(); random.random = new Random(seed); return NONE; }
Example 4
Source File: MathLib.java From HtmlNative with Apache License 2.0 | 4 votes |
public LuaValue call(LuaValue arg) { long seed = arg.checklong(); random.random = new Random(seed); return NONE; }
Example 5
Source File: MathLib.java From luaj with MIT License | 4 votes |
public LuaValue call(LuaValue arg) { long seed = arg.checklong(); random.random = new Random(seed); return NONE; }