Package com.prineside.luaj
Interface LuaTable.Slot
- All Known Implementing Classes:
LuaTable.DeadSlot
,LuaTable.IntKeyEntry
,LuaTable.LinkSlot
,LuaTable.NormalEntry
,LuaTable.NumberValueEntry
,WeakTable.WeakKeyAndValueSlot
,WeakTable.WeakKeySlot
,WeakTable.WeakSlot
,WeakTable.WeakValueSlot
- Enclosing class:
- LuaTable
public static interface LuaTable.Slot
Represents a slot in the hash table.
-
Method Summary
Modifier and TypeMethodDescriptionadd
(LuaTable.Slot newEntry) Link the given new entry to this slot.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.boolean
Compare given key with first()'s key; return true if equal.int
keyindex
(int hashMask) Return hash{pow2,mod}( first().key().hashCode(), sizeMask )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.
-
Method Details
-
keyindex
int keyindex(int hashMask) Return hash{pow2,mod}( first().key().hashCode(), sizeMask ) -
first
com.prineside.luaj.LuaTable.StrongSlot first()Return first Entry, if still present, or null. -
find
Compare given key with first()'s key; return first() if equal. -
keyeq
Compare given key with first()'s key; return true if equal. May return true for keys no longer present in the table. -
rest
LuaTable.Slot rest()Return rest of elements -
arraykey
int arraykey(int max) Return first entry's key, iff it is an integer between 1 and max, inclusive, or zero otherwise. -
set
Set the value of this Slot's first Entry, if possible, or return a new Slot whose first entry has the given value. -
add
Link the given new entry to this slot. -
remove
Return a Slot with the given value set to nil; must not return null for next() to behave correctly. -
relink
Return a Slot with the same first key and value (if still present) and rest() equal to rest.
-