|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.agena.minerva.util.model.Variable
public class Variable
This class encapsulates any data that consists, fundamentally, of a name, a numerical value and a default numerical value.
Field Summary | |
---|---|
static double |
version
|
Fields inherited from interface uk.co.agena.minerva.util.model.Writable |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
Variable()
Default constructor. |
|
Variable(java.lang.String name)
Creates a Variable with a name and an initial default value and actual value of 0. |
|
Variable(java.lang.String name,
double defaultValue)
Creates a Variable with a name and an initial default value. |
|
Variable(java.lang.String name,
double value,
double defaultValue)
Creates a fully specified Variable. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Makes a copy of this Variable object. |
double |
getDefaultValue()
|
java.lang.String |
getName()
|
double |
getValue()
|
double |
getVersion()
Returns the version of the class. |
boolean |
isValueSet()
|
int |
read(java.util.List strings,
int currentLineNumber)
|
void |
setDefaultValue(double defaultValue)
|
void |
setName(java.lang.String name)
|
void |
setValue(double value)
|
void |
setValueSet(boolean valueSet)
|
void |
setVersion(double version)
Sets the version number of the class. |
java.lang.String |
toString()
Creates a String representation of the Variable. |
java.util.List |
write()
Writes the object in question to a List of Strings. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double version
Constructor Detail |
---|
public Variable()
public Variable(java.lang.String name, double value, double defaultValue)
name
- value
- defaultValue
- public Variable(java.lang.String name, double defaultValue)
name
- defaultValue
- public Variable(java.lang.String name)
name
- Method Detail |
---|
public double getVersion()
Writable
getVersion
in interface Writable
public void setVersion(double version)
Writable
setVersion
in interface Writable
version
- the version numberpublic double getDefaultValue()
public void setDefaultValue(double defaultValue)
public java.lang.String getName()
public void setName(java.lang.String name)
public double getValue()
public void setValue(double value)
public boolean isValueSet()
public void setValueSet(boolean valueSet)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.util.List write() throws MinervaReadWriteException
Writable
write
in interface Writable
MinervaReadWriteException
- if therepublic int read(java.util.List strings, int currentLineNumber) throws MinervaReadWriteException
read
in interface Writable
MinervaReadWriteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |