Available Methods
- NIL
- valueOf ( )
- set ( )
- isnil ( )
- type ( )
- call ( )
- isfunction ( )
- TNIL
- TSTRING
- checkglobals ( )
- FALSE
- toint ( )
- TRUE
- isstring ( )
- TBOOLEAN
- invoke ( )
- TUSERDATA
- checkint ( )
- TNUMBER
- TFUNCTION
- toboolean ( )
- isint ( )
- tojstring ( )
- get ( )
- getmetatable ( )
- checkfunction ( )
- tonumber ( )
- checktable ( )
- ZERO
- setmetatable ( )
- varargsOf ( )
- optint ( )
- equals ( )
- NEWINDEX
- touserdata ( )
- optuserdata ( )
- tostring ( )
- optjstring ( )
- error ( )
- checkstring ( )
- ADD
- ENV
- islong ( )
- SUB
- length ( )
- istable ( )
- MOD
- argerror ( )
- checklong ( )
- opttable ( )
- LEN
- isnumber ( )
- LT
Related Classes
- java.io.File
- java.io.InputStream
- android.os.Bundle
- android.content.Context
- android.view.View
- java.util.Date
- java.util.Iterator
- android.util.Log
- java.lang.reflect.Method
- java.io.ByteArrayOutputStream
- android.os.Build
- java.lang.reflect.Field
- android.widget.ImageView
- java.lang.reflect.InvocationTargetException
- java.util.Calendar
- java.util.Map.Entry
- android.text.TextUtils
- android.view.MotionEvent
- java.lang.reflect.Constructor
- org.json.JSONObject
- org.json.JSONException
- android.widget.RelativeLayout
- java.lang.reflect.Modifier
- org.json.JSONArray
- java.lang.reflect.Array
Java Code Examples for org.luaj.vm2.LuaValue#islong()
The following examples show how to use
org.luaj.vm2.LuaValue#islong() .
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 luaj with MIT License | 5 votes |
public Varargs invoke(Varargs args) { LuaValue n = args.arg1(); /* number is its own integer part, no fractional part */ if (n.islong()) return varargsOf(n, valueOf(0.0)); double x = n.checkdouble(); /* integer part (rounds toward zero) */ double intPart = ( x > 0 ) ? Math.floor( x ) : Math.ceil( x ); /* fractional part (test needed for inf/-inf) */ double fracPart = x == intPart ? 0.0 : x - intPart; return varargsOf( valueOf(intPart), valueOf(fracPart) ); }
Example 3
Source File: MathLib.java From luaj with MIT License | 4 votes |
public LuaValue call(LuaValue xv, LuaValue yv) { if (xv.islong() && yv.islong()) { return valueOf(xv.tolong() % yv.tolong()); } return valueOf(xv.checkdouble() % yv.checkdouble()); }