|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.luaj.vm2.Varargs
org.luaj.vm2.LuaValue
org.luaj.vm2.LuaTable
public class LuaTable
| Field Summary | |
|---|---|
protected LuaValue[] |
array
|
protected LuaValue[] |
hashKeys
|
protected LuaValue[] |
hashValues
|
| Fields inherited from class org.luaj.vm2.LuaValue |
|---|
CALL, EMPTYSTRING, FALSE, INDEX, METATABLE, MINUSONE, MODE, NEWINDEX, NIL, NILS, NONE, NOVALS, ONE, TBOOLEAN, TFUNCTION, TINT, TLIGHTUSERDATA, TNIL, TNONE, TNUMBER, TRUE, TSTRING, TTABLE, TTHREAD, TUSERDATA, TVALUE, TYPE_NAMES, ZERO |
| Constructor Summary | |
|---|---|
LuaTable()
|
|
LuaTable(int narray,
int nhash)
|
|
LuaTable(LuaValue[] named,
LuaValue[] unnamed,
Varargs lastarg)
|
|
LuaTable(Varargs varargs)
|
|
LuaTable(Varargs varargs,
int firstarg)
|
|
| Method Summary | |
|---|---|
protected LuaTable |
changemode(boolean weakkeys,
boolean weakvalues)
|
LuaTable |
checktable()
|
LuaValue |
concat(LuaString sep,
int i,
int j)
|
LuaValue |
foreach(LuaValue func)
Call the supplied function once for each key-value pair |
LuaValue |
foreachi(LuaValue func)
Call the supplied function once for each key-value pair in the contiguous array part |
LuaValue |
get(int key)
|
LuaValue |
get(LuaValue key)
|
LuaValue |
getmetatable()
|
LuaValue |
getn()
|
int |
hashFindSlot(LuaValue key)
|
void |
hashset(LuaValue key,
LuaValue value)
|
Varargs |
inext(LuaValue key)
Get the next element after a particular key in the contiguous array part of a table |
void |
insert(int pos,
LuaValue value)
|
boolean |
istable()
|
LuaValue[] |
keys()
Value used in testing to enumerate the keys |
LuaValue |
len()
|
int |
length()
Get the length of this table, as lua defines it. |
int |
maxn()
|
Varargs |
next(LuaValue key)
Get the next element after a particular key in the table |
LuaTable |
opttable(LuaTable defval)
|
void |
presize(int i)
|
LuaValue |
rawget(int key)
|
LuaValue |
rawget(LuaValue key)
|
void |
rawset(int key,
LuaValue value)
|
void |
rawset(LuaValue key,
LuaValue value)
caller must ensure key is not nil |
protected LuaTable |
recreateas(boolean weakkeys,
boolean weakvalues)
|
LuaValue |
remove(int pos)
|
void |
set(int key,
LuaValue value)
|
void |
set(LuaValue key,
LuaValue value)
caller must ensure key is not nil |
LuaValue |
setmetatable(LuaValue metatable)
|
void |
sort(LuaValue comparator)
|
int |
type()
|
java.lang.String |
typename()
|
| Methods inherited from class org.luaj.vm2.Varargs |
|---|
argcheck, checkboolean, checkclosure, checkdouble, checkfunction, checkint, checkinteger, checkjstring, checklong, checknotnil, checknumber, checkstring, checkString, checktable, checkthread, checkuserdata, checkuserdata, checkvalue, eval, isfunction, isnil, isnoneornil, isnumber, isstring, istable, isTailcall, isthread, isuserdata, isvalue, optboolean, optclosure, optdouble, optfunction, optint, optinteger, optjstring, optlong, optnumber, optstring, optString, opttable, optthread, optuserdata, optuserdata, optvalue, subargs, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tolong, toshort, touserdata, touserdata, type |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected LuaValue[] array
protected LuaValue[] hashKeys
protected LuaValue[] hashValues
| Constructor Detail |
|---|
public LuaTable()
public LuaTable(int narray,
int nhash)
public LuaTable(LuaValue[] named,
LuaValue[] unnamed,
Varargs lastarg)
public LuaTable(Varargs varargs)
public LuaTable(Varargs varargs,
int firstarg)
| Method Detail |
|---|
public int type()
type in class LuaValuepublic java.lang.String typename()
typename in class LuaValuepublic boolean istable()
istable in class LuaValuepublic LuaTable checktable()
checktable in class LuaValuepublic LuaTable opttable(LuaTable defval)
opttable in class LuaValuepublic void presize(int i)
presize in class LuaValuepublic LuaValue getmetatable()
getmetatable in class LuaValuepublic LuaValue setmetatable(LuaValue metatable)
setmetatable in class LuaValue
protected LuaTable changemode(boolean weakkeys,
boolean weakvalues)
protected LuaTable recreateas(boolean weakkeys,
boolean weakvalues)
public LuaValue get(int key)
get in class LuaValuepublic LuaValue get(LuaValue key)
get in class LuaValuepublic LuaValue rawget(int key)
rawget in class LuaValuepublic LuaValue rawget(LuaValue key)
rawget in class LuaValue
public void set(int key,
LuaValue value)
set in class LuaValue
public void set(LuaValue key,
LuaValue value)
set in class LuaValue
public void rawset(int key,
LuaValue value)
rawset in class LuaValue
public void rawset(LuaValue key,
LuaValue value)
rawset in class LuaValuepublic LuaValue remove(int pos)
public void insert(int pos,
LuaValue value)
public LuaValue concat(LuaString sep,
int i,
int j)
public LuaValue getn()
getn in class LuaValuepublic int length()
length in class LuaValuepublic LuaValue len()
len in class LuaValuepublic int maxn()
public Varargs next(LuaValue key)
next in class LuaValuepublic Varargs inext(LuaValue key)
inext in class LuaValuepublic LuaValue foreach(LuaValue func)
func - function to callpublic LuaValue foreachi(LuaValue func)
func - public LuaValue[] keys()
public void hashset(LuaValue key,
LuaValue value)
public int hashFindSlot(LuaValue key)
public void sort(LuaValue comparator)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||