Package hec.hecmath.computation
Class Variable
java.lang.Object
hec.hecmath.computation.Variable
- All Implemented Interfaces:
Constants
,Evaluable
,Setable
,Updatable
,UpdatableListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface hec.hecmath.computation.Constants
Constants.LogicTestOperator, Constants.MathOperator, Constants.Notation, Constants.Precedence, Constants.QualityOperator, Constants.QualityTestOperator, Constants.TextOperator, Constants.TextTestOperator, Constants.ValueTestOperator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected static boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected static boolean
protected String
protected int
protected String
static final String
protected static Variable
protected boolean
protected static boolean
protected Set<UpdatableListener>
protected Object
protected double
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
double
evaluate()
boolean
static boolean
boolean
static boolean
getName()
int
boolean
static boolean
boolean
static boolean
isVariableName
(String text) static double
normalize
(double value) void
void
void
registerListener
(UpdatableListener listener) void
reset()
void
setAllowDenormal
(boolean setting) static void
setAllowDenormalByDefault
(boolean setting) void
setExceptionOnUndefined
(boolean setting) static void
setExceptionOnUndefinedByDefault
(boolean setting) protected void
void
setQuality
(int quality) void
setQuality
(Integer quality) void
setQuality
(String quality) void
void
setTolerateUndefined
(boolean setting) static void
setTolerateUndefinedByDefault
(boolean setting) void
setValue
(double value) void
setValue
(int value) void
void
void
void
setValueAndQuality
(double value, int quality) void
setValueAndQuality
(Object valueObj, Object qualityObj) toNotation
(Constants.Notation notation) toString()
void
void
void
unregisterListener
(UpdatableListener listener)
-
Field Details
-
variableNamePattern
- See Also:
-
textStringPattern
- See Also:
-
theInstance
-
tolerateUndefinedByDefault
protected static boolean tolerateUndefinedByDefault -
exceptionOnUndefinedByDefault
protected static boolean exceptionOnUndefinedByDefault -
allowDenormalByDefault
protected static boolean allowDenormalByDefault -
updateListeners
-
updateListenersLock
-
name
-
containsValue
protected boolean containsValue -
containsQuality
protected boolean containsQuality -
containsText
protected boolean containsText -
value
protected double value -
quality
protected int quality -
text
-
tolerateUndefined
protected boolean tolerateUndefined -
exceptionOnUndefined
protected boolean exceptionOnUndefined -
allowDenormal
protected boolean allowDenormal
-
-
Constructor Details
-
Variable
protected Variable() -
Variable
- Throws:
ComputationException
-
Variable
- Throws:
ComputationException
-
Variable
- Throws:
ComputationException
-
Variable
- Throws:
ComputationException
-
Variable
- Throws:
ComputationException
-
-
Method Details
-
getTolerateUndefinedByDefault
public static boolean getTolerateUndefinedByDefault() -
setTolerateUndefinedByDefault
public static void setTolerateUndefinedByDefault(boolean setting) -
getExceptionOnUndefinedByDefault
public static boolean getExceptionOnUndefinedByDefault() -
setExceptionOnUndefinedByDefault
public static void setExceptionOnUndefinedByDefault(boolean setting) -
getAllowDenormalByDefault
public static boolean getAllowDenormalByDefault() -
setAllowDenormalByDefault
public static void setAllowDenormalByDefault(boolean setting) -
normalize
public static double normalize(double value) -
isVariableName
-
reset
public void reset() -
setValue
- Specified by:
setValue
in interfaceSetable
- Throws:
ComputationException
-
setValue
- Specified by:
setValue
in interfaceSetable
- Throws:
ComputationException
-
setValue
- Specified by:
setValue
in interfaceSetable
- Throws:
ComputationException
-
setValue
- Specified by:
setValue
in interfaceSetable
- Throws:
ComputationException
-
setValue
- Specified by:
setValue
in interfaceSetable
- Throws:
ComputationException
-
setQuality
- Throws:
ComputationException
-
setQuality
- Throws:
ComputationException
-
setQuality
- Throws:
ComputationException
-
setValueAndQuality
- Throws:
ComputationException
-
setValueAndQuality
- Throws:
ComputationException
-
setText
- Throws:
ComputationException
-
evaluate
- Specified by:
evaluate
in interfaceEvaluable
- Throws:
ComputationException
-
evaluateToString
- Specified by:
evaluateToString
in interfaceEvaluable
- Throws:
ComputationException
-
hasQuality
public boolean hasQuality() -
getQuality
- Throws:
ComputationException
-
setName
- Throws:
ComputationException
-
getName
-
toString
-
toNotation
- Specified by:
toNotation
in interfaceEvaluable
- Throws:
ComputationException
-
getTolerateUndefined
public boolean getTolerateUndefined()- Specified by:
getTolerateUndefined
in interfaceEvaluable
-
getExceptionOnUndefined
public boolean getExceptionOnUndefined()- Specified by:
getExceptionOnUndefined
in interfaceEvaluable
-
getAllowDenormal
public boolean getAllowDenormal()- Specified by:
getAllowDenormal
in interfaceEvaluable
-
setTolerateUndefined
public void setTolerateUndefined(boolean setting) - Specified by:
setTolerateUndefined
in interfaceEvaluable
-
setExceptionOnUndefined
public void setExceptionOnUndefined(boolean setting) - Specified by:
setExceptionOnUndefined
in interfaceEvaluable
-
setAllowDenormal
public void setAllowDenormal(boolean setting) - Specified by:
setAllowDenormal
in interfaceEvaluable
-
registerListener
- Specified by:
registerListener
in interfaceUpdatable
-
unregisterListener
- Specified by:
unregisterListener
in interfaceUpdatable
-
notifyListeners
public void notifyListeners()- Specified by:
notifyListeners
in interfaceUpdatable
-
registerAsListener
- Specified by:
registerAsListener
in interfaceUpdatableListener
-
unregisterAsListener
- Specified by:
unregisterAsListener
in interfaceUpdatableListener
-
unregisterAsListener
public void unregisterAsListener()- Specified by:
unregisterAsListener
in interfaceUpdatableListener
-
dataUpdated
- Specified by:
dataUpdated
in interfaceUpdatableListener
-