Package com.prineside.luaj
Class LuaTable.NormalEntry
java.lang.Object
com.prineside.luaj.Varargs
com.prineside.luaj.LuaTable.NormalEntry
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,LuaTable.Slot
- Enclosing class:
- LuaTable
public static class LuaTable.NormalEntry
extends Varargs
implements com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.prineside.luaj.Varargs
Varargs.ArrayVarargs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(LuaTable.Slot entry) Link the given new entry to this slot.arg
(int i) Get the n-th argument value (1-based).arg1()
Get the first argument in the list.int
arraykey
(int max) Return first entry's key, iff it is an integer between 1 and max, inclusive, or zero otherwise.com.prineside.luaj.LuaTable.StrongSlot
Compare given key with first()'s key; return first() if equal.com.prineside.luaj.LuaTable.StrongSlot
first()
Return first Entry, if still present, or null.key()
boolean
Compare given key with first()'s key; return true if equal.int
keyindex
(int hashMask) Return hash{pow2,mod}( first().key().hashCode(), sizeMask )int
narg()
Get the number of arguments, or 0 if there are none.void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) relink
(LuaTable.Slot rest) Return a Slot with the same first key and value (if still present) and rest() equal to rest.remove
(com.prineside.luaj.LuaTable.StrongSlot target) Return a Slot with the given value set to nil; must not return null for next() to behave correctly.rest()
Return rest of elementsSet the value of this Slot's first Entry, if possible, or return a new Slot whose first entry has the given value.com.prineside.luaj.LuaTable.Entry
subargs
(int start) Create aVarargs
instance containing arguments starting at indexstart
Subclasses should redefine as "return this;" whenever possible.value()
void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.luaj.Varargs
argcheck, checkboolean, checkclosure, checkdouble, checkfunction, checkint, checkjstring, checklong, checknotnil, checknumber, checkstring, checktable, checkthread, checkuserdata, checkuserdata, checkvalue, dealias, eval, isfunction, isnil, isnoneornil, isnumber, isstring, istable, isTailcall, isthread, isuserdata, isvalue, optboolean, optclosure, optdouble, optfunction, optint, optjstring, optlong, optnumber, optstring, opttable, optthread, optuserdata, optuserdata, optvalue, toboolean, tobyte, tochar, todouble, tofloat, toint, tojstring, tojstring, tolong, toshort, toString, touserdata, touserdata, type
-
Constructor Details
-
NormalEntry
public NormalEntry()
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
key
-
value
-
set
-
toVarargs
Subclasses should redefine as "return this;" whenever possible. -
keyindex
public int keyindex(int hashMask) Description copied from interface:LuaTable.Slot
Return hash{pow2,mod}( first().key().hashCode(), sizeMask )- Specified by:
keyindex
in interfaceLuaTable.Slot
-
keyeq
Description copied from interface:LuaTable.Slot
Compare given key with first()'s key; return true if equal. May return true for keys no longer present in the table.- Specified by:
keyeq
in interfaceLuaTable.Slot
-
arraykey
public int arraykey(int max) Description copied from interface:LuaTable.Slot
Return first entry's key, iff it is an integer between 1 and max, inclusive, or zero otherwise.- Specified by:
arraykey
in interfaceLuaTable.Slot
-
arg
Description copied from class:Varargs
Get the n-th argument value (1-based). -
narg
public int narg()Description copied from class:Varargs
Get the number of arguments, or 0 if there are none. -
arg1
Description copied from class:Varargs
Get the first argument in the list. -
subargs
Description copied from class:Varargs
Create aVarargs
instance containing arguments starting at indexstart
-
first
public com.prineside.luaj.LuaTable.StrongSlot first()Description copied from interface:LuaTable.Slot
Return first Entry, if still present, or null.- Specified by:
first
in interfaceLuaTable.Slot
-
rest
Description copied from interface:LuaTable.Slot
Return rest of elements- Specified by:
rest
in interfaceLuaTable.Slot
-
find
Description copied from interface:LuaTable.Slot
Compare given key with first()'s key; return first() if equal.- Specified by:
find
in interfaceLuaTable.Slot
-
set
Description copied from interface:LuaTable.Slot
Set the value of this Slot's first Entry, if possible, or return a new Slot whose first entry has the given value.- Specified by:
set
in interfaceLuaTable.Slot
-
add
Description copied from interface:LuaTable.Slot
Link the given new entry to this slot.- Specified by:
add
in interfaceLuaTable.Slot
-
remove
Description copied from interface:LuaTable.Slot
Return a Slot with the given value set to nil; must not return null for next() to behave correctly.- Specified by:
remove
in interfaceLuaTable.Slot
-
relink
Description copied from interface:LuaTable.Slot
Return a Slot with the same first key and value (if still present) and rest() equal to rest.- Specified by:
relink
in interfaceLuaTable.Slot
-