Class LuaTable

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Direct Known Subclasses:
Globals, ScriptManager.ReadOnlyLuaTable

public class LuaTable extends LuaValue implements com.esotericsoftware.kryo.KryoSerializable
Subclass of LuaValue for representing lua tables.

Almost all API's implemented in LuaTable are defined and documented in LuaValue.

If a table is needed, the one of the type-checking functions can be used such as istable(), checktable(), or opttable(LuaTable)

The main table operations are defined on LuaValue for getting and setting values with and without metatag processing:

To iterate over key-value pairs from Java, use

 
 LuaValue k = LuaValue.NIL;
 while ( true ) {
    Varargs n = table.next(k);
    if ( (k = n.arg1()).isnil() )
       break;
    LuaValue v = n.arg(2)
    process( k, v )
 }

As with other types, LuaTable instances should be constructed via one of the table constructor methods on LuaValue:

See Also: