|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsynoptic.parser.Variable
public class Variable
A ready to use Variable class, implementing VariableDefinition
Constructor Summary | |
---|---|
Variable(java.lang.String name)
Creates a variable of the specified name with the default value of 0 |
|
Variable(java.lang.String name,
byte value)
Creates a variable of the specified name with the given value |
|
Variable(java.lang.String name,
double value)
Creates a variable of the specified name with the given value |
|
Variable(java.lang.String name,
float value)
Creates a variable of the specified name with the given value |
|
Variable(java.lang.String name,
int value)
Creates a variable of the specified name with the given value |
|
Variable(java.lang.String name,
long value)
Creates a variable of the specified name with the given value |
|
Variable(java.lang.String name,
java.lang.Number value)
Creates a variable of the specified name with the given value |
|
Variable(java.lang.String name,
short value)
Creates a variable of the specified name with the given value |
Method Summary | |
---|---|
java.lang.String |
getName()
|
java.lang.Number |
getValue()
|
void |
setValue(byte n)
Sets the new value for this variable to the byte n |
void |
setValue(double n)
Sets the new value for this variable to the double n |
void |
setValue(float n)
Sets the new value for this variable to the float n |
void |
setValue(int n)
Sets the new value for this variable to the int n |
void |
setValue(long n)
Sets the new value for this variable to the long n |
void |
setValue(java.lang.Number n)
Sets the new value for this variable to the Number n |
void |
setValue(short n)
Sets the new value for this variable to the short n |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Variable(java.lang.String name, java.lang.Number value)
name
- value
- public Variable(java.lang.String name)
name
- public Variable(java.lang.String name, byte value)
name
- value
- public Variable(java.lang.String name, short value)
name
- value
- public Variable(java.lang.String name, int value)
name
- value
- public Variable(java.lang.String name, long value)
name
- value
- public Variable(java.lang.String name, float value)
name
- value
- public Variable(java.lang.String name, double value)
name
- value
- Method Detail |
---|
public java.lang.String getName()
getName
in interface VariableDefinition
public java.lang.Number getValue()
getValue
in interface VariableDefinition
public void setValue(java.lang.Number n)
public void setValue(byte n)
public void setValue(short n)
public void setValue(int n)
public void setValue(long n)
public void setValue(float n)
public void setValue(double n)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |