Class LuaTable.IntKeyEntry

java.lang.Object
com.prineside.luaj.Varargs
com.prineside.luaj.LuaTable.IntKeyEntry
All Implemented Interfaces:
KryoSerializable, LuaTable.Slot
Enclosing class:
LuaTable

public static class LuaTable.IntKeyEntry extends Varargs implements KryoSerializable
  • Constructor Details

    • IntKeyEntry

      public IntKeyEntry()
  • Method Details

    • write

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

      public void read(Kryo kryo, Input input)
      Specified by:
      read in interface KryoSerializable
    • key

      public LuaValue key()
    • 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
    • value

      public LuaValue value()
    • set

      public com.prineside.luaj.LuaTable.Entry set(LuaValue value)
    • keyindex

      public int keyindex(int mask)
      Description copied from interface: LuaTable.Slot
      Return hash{pow2,mod}( first().key().hashCode(), sizeMask )
      Specified by:
      keyindex 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
    • arg

      public LuaValue arg(int i)
      Description copied from class: Varargs
      Get the n-th argument value (1-based).
      Specified by:
      arg in class Varargs
      Parameters:
      i - the index of the argument to get, 1 is the first argument
      Returns:
      Value at position i, or LuaValue.NIL if there is none.
      See Also:
    • narg

      public int narg()
      Description copied from class: Varargs
      Get the number of arguments, or 0 if there are none.
      Specified by:
      narg in class Varargs
      Returns:
      number of arguments.
    • toVarargs

      public Varargs toVarargs()
      Subclasses should redefine as "return this;" whenever possible.
    • arg1

      public LuaValue arg1()
      Description copied from class: Varargs
      Get the first argument in the list.
      Specified by:
      arg1 in class Varargs
      Returns:
      LuaValue which is first in the list, or LuaValue.NIL if there are no values.
      See Also:
    • subargs

      public Varargs subargs(int start)
      Description copied from class: Varargs
      Create a Varargs instance containing arguments starting at index start
      Specified by:
      subargs in class Varargs
      Parameters:
      start - the index from which to include arguments, where 1 is the first argument.
      Returns:
      Varargs containing argument { start, start+1, ... , narg-start-1 }
    • 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
    • rest

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