public class Variable extends Object
A variable is an object storing a single value of arbitrary type. When used as fields in function class instances, they serve a function equivalent to that of upvalues in PUC-Lua.
Constructor and Description |
---|
Variable(Object initialValue)
Creates a new variable instance with the given initial value.
|
Modifier and Type | Method and Description |
---|---|
Object |
get()
Gets the value stored in this variable.
|
void |
set(Object value)
Sets the value stored in this variable to
value . |
public Variable(Object initialValue)
initialValue
- the initial value of the variable, may be null
Copyright © 2016. All rights reserved.