@Override public LuaValue get( int key ) { LuaValue v = rawget(key); return v.isnil() && m_metatable!=null? gettable(this,valueOf(key)): v; }
public LuaValue get( int key ) { LuaValue v = rawget(key); return v.isnil() && m_metatable!=null? gettable(this,valueOf(key)): v; }
public LuaValue get( int key ) { LuaValue v = rawget(key); return v.isnil() && m_metatable!=null? gettable(this,valueOf(key)): v; }
/** * Construct table of unnamed elements. * @param varargs Unnamed elements in order {@code value-1, value-2, ... } * @param firstarg the index in varargs of the first argument to include in the table */ public LuaTable(Varargs varargs, int firstarg) { int nskip = firstarg-1; int n = Math.max(varargs.narg()-nskip,0); presize( n, 1 ); set(N, valueOf(n)); for ( int i=1; i<=n; i++ ) set(i, varargs.arg(i+nskip)); }
/** * Construct table of unnamed elements. * @param varargs Unnamed elements in order {@code value-1, value-2, ... } * @param firstarg the index in varargs of the first argument to include in the table */ public LuaTable(Varargs varargs, int firstarg) { int nskip = firstarg-1; int n = Math.max(varargs.narg()-nskip,0); presize( n, 1 ); set(N, valueOf(n)); for ( int i=1; i<=n; i++ ) set(i, varargs.arg(i+nskip)); }
/** * Construct table of unnamed elements. * @param varargs Unnamed elements in order {@code value-1, value-2, ... } * @param firstarg the index in varargs of the first argument to include in the table */ public LuaTable(Varargs varargs, int firstarg) { int nskip = firstarg-1; int n = Math.max(varargs.narg()-nskip,0); presize( n, 1 ); set(N, valueOf(n)); for ( int i=1; i<=n; i++ ) set(i, varargs.arg(i+nskip)); }