public abstract class Variable
extends java.lang.Object
implements java.io.Serializable
Variable (getValue,
setValue,
getLowerLimit,setLowerLimit,getUpperLimit,
setUpperLimit)
are not applicable to all the subclasses of Variable.
For this reason, they are defined by default as giving a fatal error.| Constructor and Description |
|---|
Variable() |
| Modifier and Type | Method and Description |
|---|---|
abstract Variable |
deepCopy()
Creates an exact copy of a
Variable object. |
double |
getLowerBound()
Gets the lower bound value of a variable.
|
double |
getUpperBound()
Gets the upper bound value of a variable.
|
double |
getValue()
Gets the double value representating the variable.
|
java.lang.Class<? extends Variable> |
getVariableType()
Gets the type of the variable.
|
void |
setLowerBound(double lowerBound)
Sets the lower bound for a variable.
|
void |
setUpperBound(double upperBound)
Sets the upper bound for a variable.
|
void |
setValue(double value)
Sets a double value to a variable in subclasses of
Variable. |
public abstract Variable deepCopy()
Variable object.public double getValue()
throws JMException
Variable (i.e. Real
and Int).
As not all objects belonging to a subclass of Variable have a
double value, a call to this method it is considered a fatal error by
default, and the program is terminated. Those classes requiring this method
must redefine it.JMExceptionpublic void setValue(double value)
throws JMException
Variable.
As not all objects belonging to a subclass of Variable have a
double value, a call to this method it is considered a fatal error by
default, and the program is terminated. Those classes requiring this method
must redefine it.JMExceptionpublic double getLowerBound()
throws JMException
Variable have a lower bound,
a call to this method is considered a fatal error by default,
and the program is terminated.
Those classes requiring this method must redefine it.JMExceptionpublic void setLowerBound(double lowerBound)
throws JMException
Variable have a lower bound, a call to this method
is considered a fatal error by default and the program is terminated.
Those classes requiring this method must to redefine it.JMExceptionpublic double getUpperBound()
throws JMException
Variable have an upper
bound, a call to this method is considered a fatal error by default, and the
program is terminated. Those classes requiring this method must redefine it.JMExceptionpublic void setUpperBound(double upperBound)
throws JMException
Variable have an upper bound, a call to this method
is considered a fatal error by default, and the program is terminated.
Those classes requiring this method must redefine it.JMExceptionpublic java.lang.Class<? extends Variable> getVariableType()