Class ClassTreeLuaTable
java.lang.Object
com.prineside.luaj.Varargs
com.prineside.luaj.LuaValue
com.prineside.luaj.LuaTable
com.prineside.tdi2.managers.script.ClassTreeLuaTable
- All Implemented Interfaces:
KryoSerializable
Read-only LuaTable which stores a part of the class tree and allows to be properly serialized
in case user stores a part of the tree in a separate variable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.luaj.LuaTable
LuaTable.DeadSlot, LuaTable.IntKeyEntry, LuaTable.LinkSlot, LuaTable.NormalEntry, LuaTable.NumberValueEntry, LuaTable.SlotNested classes/interfaces inherited from class com.prineside.luaj.LuaValue
LuaValue.NillableSerializer, LuaValue.NoneNested classes/interfaces inherited from class com.prineside.luaj.Varargs
Varargs.ArrayVarargs -
Field Summary
Fields inherited from class com.prineside.luaj.LuaTable
CLASS_COMPARATORFields inherited from class com.prineside.luaj.LuaValue
ADD, CALL, CONCAT, DIV, EMPTYSTRING, ENV, EQ, FALSE, INDEX, IPAIRS, LE, LEN, LT, METATABLE, MINUSONE, MOD, MODE, MUL, NEWINDEX, NIL, NILLABLE_SERIALIZER, NILS, NONE, NOVALS, ONE, PAIRS, POW, SUB, TBOOLEAN, TFUNCTION, TINT, TLIGHTUSERDATA, TNIL, TNONE, TNUMBER, TOSTRING, TRUE, TSTRING, TTABLE, TTHREAD, TUSERDATA, TVALUE, TYPE_NAMES, UNM, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionClassTreeLuaTable(LuaValue table) Copies the table into ReadOnly recursively -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidSet a value in a table without metatag processing.voidcaller must ensure key is not nilvoidremove(int pos) Remove the element at a position in a list-tablevoidSet a value in a table without metatag processing usingLuaValue.NEWINDEX.setmetatable(LuaValue metatable) Set the metatable for thisLuaValuetostring()Conditionally convert to lua string without throwing errors.voidMethods inherited from class com.prineside.luaj.LuaTable
arrayget, checktable, concat, entry, eq, eq_b, get, get, getHashEntries, getmetatable, hashmod, hashpow2, hashset, hashSlot, inext, insert, istable, keyCount, keys, len, length, next, opttable, presize, presize, rawget, rawget, rawlen, set, sort, toLuaValue, type, typename, unpack, unpack, unpack, useWeakKeys, useWeakValues, wrapMethods inherited from class com.prineside.luaj.LuaValue
add, add, add, and, arg, arg1, argerror, assert_, buffer, call, call, call, call, call, cBool, cDouble, cFloat, checkboolean, checkclosure, checkdouble, checkfunction, checkglobals, checkint, checkjstring, checklong, checknotnil, checknumber, checknumber, checkstring, checkuserdata, checkuserdata, cInt, cNcDouble, cNcFloat, cNcInt, cObject, comparemt, concat, concat, concatmt, concatTo, concatTo, concatTo, cRegObject, div, div, div, divInto, eqmtcall, equals, error, get, gt, gt, gt, gt_b, gt_b, gt_b, gteq, gteq, gteq, gteq_b, gteq_b, gteq_b, initupvalue1, invoke, invoke, invoke, invoke, invoke, invokemethod, invokemethod, invokemethod, invokemethod, isboolean, isclosure, isfunction, isint, isinttype, islong, isnil, isnumber, isRegObject, isstring, isuserdata, isuserdata, isvalidkey, listOf, listOf, load, lt, lt, lt, lt_b, lt_b, lt_b, lteq, lteq, lteq, lteq_b, lteq_b, lteq_b, metatag, method, method, method, method, method, method, mod, mod, mod, modFrom, mul, mul, mul, narg, neg, neq, neq_b, not, onInvoke, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, optuserdata, optuserdata, optvalue, or, pow, pow, pow, powWith, powWith, raweq, raweq, raweq, raweq, raweq, rawget, rawset, rawset, rawset, rawset, rawset, rawsetlist, set, set, set, set, set, strcmp, strcmp, strongvalue, strvalue, sub, sub, sub, subargs, subFrom, subFrom, tableOf, tableOf, tableOf, tableOf, tableOf, tableOf, tailcallOf, testfor_b, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tolong, tonumber, toshort, toString, touserdata, touserdata, userdataOf, userdataOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, varargsOf, varargsOf, varargsOf, varargsOf, varargsOf, varargsOfMethods inherited from class com.prineside.luaj.Varargs
argcheck, checkboolean, checkclosure, checkdouble, checkfunction, checkint, checkjstring, checklong, checknotnil, checknumber, checkstring, checktable, checkuserdata, checkuserdata, checkvalue, dealias, eval, isfunction, isnil, isnoneornil, isnumber, isstring, istable, isTailcall, isuserdata, isvalue, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, opttable, optuserdata, optuserdata, optvalue, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tolong, toshort, touserdata, touserdata, type
-
Constructor Details
-
ClassTreeLuaTable
Copies the table into ReadOnly recursively
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classLuaTable
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classLuaTable
-
loadFrom
-
setmetatable
Description copied from class:LuaValueSet the metatable for thisLuaValueFor
LuaTableandLuaUserdatainstances, the metatable is per instance. For all other types, there is one metatable per type that can be set directly from java- Overrides:
setmetatablein classLuaTable- Parameters:
metatable-LuaValueinstance to serve as the metatable, or null to reset it.- Returns:
thisto allow chaining of Java function calls
-
set
Description copied from class:LuaValueSet a value in a table without metatag processing usingLuaValue.NEWINDEX.- Overrides:
setin classLuaTable- Parameters:
key- the key to usevalue- the value to use, can beLuaValue.NIL, must not be null
-
rawset
Description copied from class:LuaValueSet a value in a table without metatag processing.- Overrides:
rawsetin classLuaTable- Parameters:
key- the key to usevalue- the value to use, can beLuaValue.NIL, must not be null
-
rawset
Description copied from class:LuaTablecaller must ensure key is not nil- Overrides:
rawsetin classLuaTable- Parameters:
key- the key to use, must not beLuaValue.NILor nullvalue- the value to use, can beLuaValue.NIL, must not be null
-
remove
Description copied from class:LuaTableRemove the element at a position in a list-table- Overrides:
removein classLuaTable- Parameters:
pos- the position to remove- Returns:
- The removed item, or
LuaValue.NONEif not removed
-
tostring
Description copied from class:LuaValueConditionally convert to lua string without throwing errors.In lua all numbers are strings, so this function will return the
LuaValuethisif it is a string or number, andLuaValue.NILfor all other cases.This allows values to be tested for their "string-ness" without the penalty of throwing exceptions.
- Overrides:
tostringin classLuaValue- Returns:
thisif it is aLuaStringorLuaNumber, otherwiseLuaValue.NIL- See Also:
-