Class UpValue

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

public final class UpValue extends Object implements com.esotericsoftware.kryo.KryoSerializable
Upvalue used with Closure formulation

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpValue(LuaValue[] stack, int index)
    Create an upvalue relative to a stack
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Close this upvalue so it is no longer on the stack
    final LuaValue
    Get the value of the upvalue
    void
    read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
     
    final void
    Set the value of the upvalue
    Convert this upvalue to a Java String
     
    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, wait, wait, wait
  • 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(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
    • 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