Class WeakTable.WeakSlot

java.lang.Object
com.prineside.luaj.WeakTable.WeakSlot
All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable, LuaTable.Slot
Direct Known Subclasses:
WeakTable.WeakKeyAndValueSlot, WeakTable.WeakKeySlot, WeakTable.WeakValueSlot
Enclosing class:
WeakTable

public abstract static class WeakTable.WeakSlot extends Object implements LuaTable.Slot, com.esotericsoftware.kryo.KryoSerializable
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    abstract int
    keyindex(int hashMask)
    Return hash{pow2,mod}( first().key().hashCode(), sizeMask )
    void
    read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
     
    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.
    abstract LuaTable.Slot
    set(LuaValue value)
     
     
     
    void
    write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
    • keyindex

      public abstract int keyindex(int hashMask)
      Description copied from interface: LuaTable.Slot
      Return hash{pow2,mod}( first().key().hashCode(), sizeMask )
      Specified by:
      keyindex in interface LuaTable.Slot
    • set

      public abstract LuaTable.Slot set(LuaValue value)
    • 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 interface LuaTable.Slot
    • find

      public com.prineside.luaj.LuaTable.StrongSlot find(LuaValue key)
      Description copied from interface: LuaTable.Slot
      Compare given key with first()'s key; return first() if equal.
      Specified by:
      find in interface LuaTable.Slot
    • keyeq

      public boolean keyeq(LuaValue key)
      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 interface LuaTable.Slot
    • rest

      public LuaTable.Slot rest()
      Description copied from interface: LuaTable.Slot
      Return rest of elements
      Specified by:
      rest in interface LuaTable.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 interface LuaTable.Slot
    • set

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

      public LuaTable.Slot add(LuaTable.Slot entry)
      Description copied from interface: LuaTable.Slot
      Link the given new entry to this slot.
      Specified by:
      add in interface LuaTable.Slot
    • remove

      public LuaTable.Slot remove(com.prineside.luaj.LuaTable.StrongSlot target)
      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 interface LuaTable.Slot
    • relink

      public LuaTable.Slot relink(LuaTable.Slot rest)
      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 interface LuaTable.Slot
    • strongkey

      public LuaValue strongkey()
    • strongvalue

      public LuaValue strongvalue()