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 booleanprotected static booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected static booleanprotected Stringprotected intprotected Stringstatic final Stringprotected static Variableprotected booleanprotected static booleanprotected Set<UpdatableListener>protected Objectprotected doublestatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoubleevaluate()booleanstatic booleanbooleanstatic booleangetName()intbooleanstatic booleanbooleanstatic booleanisVariableName(String text) static doublenormalize(double value) voidvoidvoidregisterListener(UpdatableListener listener) voidreset()voidsetAllowDenormal(boolean setting) static voidsetAllowDenormalByDefault(boolean setting) voidsetExceptionOnUndefined(boolean setting) static voidsetExceptionOnUndefinedByDefault(boolean setting) protected voidvoidsetQuality(int quality) voidsetQuality(Integer quality) voidsetQuality(String quality) voidvoidsetTolerateUndefined(boolean setting) static voidsetTolerateUndefinedByDefault(boolean setting) voidsetValue(double value) voidsetValue(int value) voidvoidvoidvoidsetValueAndQuality(double value, int quality) voidsetValueAndQuality(Object valueObj, Object qualityObj) toNotation(Constants.Notation notation) toString()voidvoidvoidunregisterListener(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:
setValuein interfaceSetable- Throws:
ComputationException
-
setValue
- Specified by:
setValuein interfaceSetable- Throws:
ComputationException
-
setValue
- Specified by:
setValuein interfaceSetable- Throws:
ComputationException
-
setValue
- Specified by:
setValuein interfaceSetable- Throws:
ComputationException
-
setValue
- Specified by:
setValuein interfaceSetable- Throws:
ComputationException
-
setQuality
- Throws:
ComputationException
-
setQuality
- Throws:
ComputationException
-
setQuality
- Throws:
ComputationException
-
setValueAndQuality
- Throws:
ComputationException
-
setValueAndQuality
- Throws:
ComputationException
-
setText
- Throws:
ComputationException
-
evaluate
- Specified by:
evaluatein interfaceEvaluable- Throws:
ComputationException
-
evaluateToString
- Specified by:
evaluateToStringin interfaceEvaluable- Throws:
ComputationException
-
hasQuality
public boolean hasQuality() -
getQuality
- Throws:
ComputationException
-
setName
- Throws:
ComputationException
-
getName
-
toString
-
toNotation
- Specified by:
toNotationin interfaceEvaluable- Throws:
ComputationException
-
getTolerateUndefined
public boolean getTolerateUndefined()- Specified by:
getTolerateUndefinedin interfaceEvaluable
-
getExceptionOnUndefined
public boolean getExceptionOnUndefined()- Specified by:
getExceptionOnUndefinedin interfaceEvaluable
-
getAllowDenormal
public boolean getAllowDenormal()- Specified by:
getAllowDenormalin interfaceEvaluable
-
setTolerateUndefined
public void setTolerateUndefined(boolean setting) - Specified by:
setTolerateUndefinedin interfaceEvaluable
-
setExceptionOnUndefined
public void setExceptionOnUndefined(boolean setting) - Specified by:
setExceptionOnUndefinedin interfaceEvaluable
-
setAllowDenormal
public void setAllowDenormal(boolean setting) - Specified by:
setAllowDenormalin interfaceEvaluable
-
registerListener
- Specified by:
registerListenerin interfaceUpdatable
-
unregisterListener
- Specified by:
unregisterListenerin interfaceUpdatable
-
notifyListeners
public void notifyListeners()- Specified by:
notifyListenersin interfaceUpdatable
-
registerAsListener
- Specified by:
registerAsListenerin interfaceUpdatableListener
-
unregisterAsListener
- Specified by:
unregisterAsListenerin interfaceUpdatableListener
-
unregisterAsListener
public void unregisterAsListener()- Specified by:
unregisterAsListenerin interfaceUpdatableListener
-
dataUpdated
- Specified by:
dataUpdatedin interfaceUpdatableListener
-