/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use * @param value the value to use, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( int key, String value ) { set(key, valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use * @param value the value to use, can be {@link #NIL}, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( int key, LuaValue value ) { set(LuaInteger.valueOf(key), value ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use * @param value the value to use, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( int key, String value ) { set(key, valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use * @param value the value to use, can be {@link #NIL}, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( int key, LuaValue value ) { set(LuaInteger.valueOf(key), value ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be {@link #NIL} or null * @param value the value to use, can be {@link #NIL}, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, LuaValue value ) { set(valueOf(key), value ); }
/** Set a value in a table without metatag processing using {@link NEWINDEX}. * @param key the key to use * @param value the value to use, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link NEWINDEX} metatag */ public void set( int key, String value ) { set(key, valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be {@link #NIL} or null * @param value the value to use, can be {@link #NIL}, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, LuaValue value ) { set(valueOf(key), value ); }
/** Set a value in a table without metatag processing using {@link NEWINDEX}. * @param key the key to use * @param value the value to use, can be {@link NIL}, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link NEWINDEX} metatag */ public void set( int key, LuaValue value ) { set(LuaInteger.valueOf(key), value ); }
/** Allow packages to mark themselves as loaded */ public void setIsLoaded(String name, LuaTable value) { package_.get(_LOADED).set(name, value); }
public Varargs invoke(Varargs args) { LuaValue t = tableOf(args, 1); t.set("n", args.narg()); return t; } }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be null * @param value the value to use * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, double value ) { set(valueOf(key), valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be null * @param value the value to use * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, double value ) { set(valueOf(key), valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be null * @param value the value to use, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, String value ) { set(valueOf(key), valueOf(value) ); }
public Varargs invoke(Varargs args) { LuaValue t = tableOf(args, 1); t.set("n", args.narg()); return t; } }
@Override public Varargs invoke(Varargs args) { LuaValue t = tableOf(args, 1); t.set("n", args.narg()); return t; } }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be null * @param value the value to use * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, int value ) { set(valueOf(key), valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be null * @param value the value to use * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, int value ) { set(valueOf(key), valueOf(value) ); }
/** Set a value in a table without metatag processing using {@link #NEWINDEX}. * @param key the key to use, must not be null * @param value the value to use, must not be null * @throws LuaError if {@code this} is not a table, * or there is no {@link #NEWINDEX} metatag */ public void set( String key, String value ) { set(valueOf(key), valueOf(value) ); }
public class MyLib extends TwoArgFunction { public static MyLib MYLIB = null; public MyLib() { MYLIB = this; } public LuaValue call(LuaValue modname, LuaValue env) { LuaTable mine = new LuaTable(0,30); mine.set("someFunc", new SomeFunc()); env.set("mine", mine); env.get("package").get("loaded").set("mine", mine); return mine; } }
@Override public LuaValue call(LuaValue var1, LuaValue var2) { LuaTable functions = new LuaTable(); functions.set("getRapidView", new GetPhotonView()); functions.set("getJavaBridge", new GetJavaBridge()); functions.set("getEnvironment", new GetEnvironment()); var2.set("rapid", functions); var2.get("package").get("loaded").set("rapid", functions); return functions; }