Interface LuaTable.Slot

All Known Implementing Classes:
LuaTable.DeadSlot, LuaTable.IntKeyEntry, LuaTable.LinkSlot, LuaTable.NormalEntry, LuaTable.NumberValueEntry, WeakTable.WeakSlot
Enclosing class:
LuaTable

public static interface LuaTable.Slot
Represents a slot in the hash table.
  • Method Summary

    Modifier and Type
    Method
    Description
    add(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
    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 )
    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.
    Return rest of elements
    set(com.prineside.luaj.LuaTable.StrongSlot target, LuaValue value)
    Set 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

      com.prineside.luaj.LuaTable.StrongSlot find(LuaValue key)
      Compare given key with first()'s key; return first() if equal.
    • keyeq

      boolean keyeq(LuaValue key)
      Compare given key with first()'s key; return true if equal. May return true for keys no longer present in the table.
    • 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

      LuaTable.Slot set(com.prineside.luaj.LuaTable.StrongSlot target, LuaValue value)
      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

      LuaTable.Slot 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.
    • relink

      Return a Slot with the same first key and value (if still present) and rest() equal to rest.