com.threerings.expr
Class Variable

java.lang.Object
  extended by com.threerings.expr.Variable

public abstract class Variable
extends Object

A general-purpose variable object.


Constructor Summary
Variable()
           
 
Method Summary
abstract  Object get()
          Retrieves the value of the variable.
 boolean getBoolean()
          Retrieves the value of the variable as a boolean.
 byte getByte()
          Retrieves the value of the variable as a byte.
 char getChar()
          Retrieves the value of the variable as a char.
 double getDouble()
          Retrieves the value of the variable as a double.
 float getFloat()
          Retrieves the value of the variable as a float.
 int getInt()
          Retrieves the value of the variable as an integer.
 long getLong()
          Retrieves the value of the variable as a long.
 short getShort()
          Retrieves the value of the variable as a short.
static Variable newInstance(boolean value)
          Creates a new variable with the given initial value.
static Variable newInstance(byte value)
          Creates a new variable with the given initial value.
static Variable newInstance(char value)
          Creates a new variable with the given initial value.
static Variable newInstance(double value)
          Creates a new variable with the given initial value.
static Variable newInstance(float value)
          Creates a new variable with the given initial value.
static Variable newInstance(int value)
          Creates a new variable with the given initial value.
static Variable newInstance(long value)
          Creates a new variable with the given initial value.
static Variable newInstance(Object value)
          Creates a new variable with the given initial value.
static Variable newInstance(short value)
          Creates a new variable with the given initial value.
abstract  void set(Object value)
          Sets the value of the variable.
 void setBoolean(boolean value)
          Sets the value of the variable as a boolean.
 void setByte(byte value)
          Sets the value of the variable as a boolean.
 void setChar(char value)
          Sets the value of the variable as a boolean.
 void setDouble(double value)
          Sets the value of the variable as a boolean.
 void setFloat(float value)
          Sets the value of the variable as a boolean.
 void setInt(int value)
          Sets the value of the variable as a boolean.
 void setLong(long value)
          Sets the value of the variable as a boolean.
 void setShort(short value)
          Sets the value of the variable as a boolean.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Variable

public Variable()
Method Detail

newInstance

public static Variable newInstance(boolean value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(byte value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(char value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(double value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(float value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(int value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(long value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(short value)
Creates a new variable with the given initial value.


newInstance

public static Variable newInstance(Object value)
Creates a new variable with the given initial value.


getBoolean

public boolean getBoolean()
Retrieves the value of the variable as a boolean.


getByte

public byte getByte()
Retrieves the value of the variable as a byte.


getChar

public char getChar()
Retrieves the value of the variable as a char.


getDouble

public double getDouble()
Retrieves the value of the variable as a double.


getFloat

public float getFloat()
Retrieves the value of the variable as a float.


getInt

public int getInt()
Retrieves the value of the variable as an integer.


getLong

public long getLong()
Retrieves the value of the variable as a long.


getShort

public short getShort()
Retrieves the value of the variable as a short.


get

public abstract Object get()
Retrieves the value of the variable.


setBoolean

public void setBoolean(boolean value)
Sets the value of the variable as a boolean.


setByte

public void setByte(byte value)
Sets the value of the variable as a boolean.


setChar

public void setChar(char value)
Sets the value of the variable as a boolean.


setDouble

public void setDouble(double value)
Sets the value of the variable as a boolean.


setFloat

public void setFloat(float value)
Sets the value of the variable as a boolean.


setInt

public void setInt(int value)
Sets the value of the variable as a boolean.


setLong

public void setLong(long value)
Sets the value of the variable as a boolean.


setShort

public void setShort(short value)
Sets the value of the variable as a boolean.


set

public abstract void set(Object value)
Sets the value of the variable.



Copyright © 2011. All Rights Reserved.