Class UpValue

java.lang.Object
com.prineside.luaj.UpValue
All Implemented Interfaces:
KryoSerializable

public final class UpValue extends Object implements KryoSerializable
Upvalue used with Closure formulation
See Also:
  • Constructor Details

    • UpValue

      public UpValue(LuaValue[] stack, int index)
      Create an upvalue relative to a stack
      Parameters:
      stack - the stack
      index - the index on the stack for the upvalue
  • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • tojstring

      public String tojstring()
      Convert this upvalue to a Java String
      Returns:
      the Java String for this upvalue.
      See Also:
    • getValue

      public final LuaValue getValue()
      Get the value of the upvalue
      Returns:
      the LuaValue for this upvalue
    • setValue

      public final void setValue(LuaValue value)
      Set the value of the upvalue
      Parameters:
      value - the LuaValue to set it to
    • close

      public final void close()
      Close this upvalue so it is no longer on the stack