org.luaj.vm2
Class UpValue

java.lang.Object
  extended by org.luaj.vm2.UpValue

public final class UpValue
extends java.lang.Object

Upvalue used with Closure formulation

See Also:
LuaClosure, Prototype

Constructor Summary
UpValue(LuaValue[] stack, int index)
          Create an upvalue relative to a stack
 
Method Summary
 void close()
          Close this upvalue so it is no longer on the stack
 LuaValue getValue()
          Get the value of the upvalue
 void setValue(LuaValue value)
          Set the value of the upvalue
 java.lang.String tojstring()
          Convert this upvalue to a Java String
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

tojstring

public java.lang.String tojstring()
Convert this upvalue to a Java String

Returns:
the Java String for this upvalue.
See Also:
LuaValue.tojstring()

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



Copyright © 2007-2015 Luaj.org. All Rights Reserved.