Package hec.hecmath.computation
Class Value
java.lang.Object
hec.hecmath.computation.Value
- All Implemented Interfaces:
Constants,Evaluable,Setable,Updatable,UpdatableListener,Comparable<Value>
-
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 static booleanprotected booleanprotected booleanprotected static booleanprotected Set<UpdatableListener>protected Objectprotected doublestatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoiddoubleevaluate()booleanstatic booleanbooleanstatic booleanbooleanstatic booleanstatic booleanstatic doublenormalize(double value) voidvoidvoidregisterListener(UpdatableListener listener) voidreset()voidsetAllowDenormal(boolean setting) static voidsetAllowDenormalByDefault(boolean setting) voidsetExceptionOnUndefined(boolean setting) static voidsetExceptionOnUndefinedByDefault(boolean setting) voidsetTolerateUndefined(boolean setting) static voidsetTolerateUndefinedByDefault(boolean setting) voidsetValue(double value) voidsetValue(int value) voidvoidvoidtoNotation(Constants.Notation notation) toString()voidvoidvoidunregisterListener(UpdatableListener listener)
-
Field Details
-
valuePattern
- See Also:
-
valuePatternWithoutSign
- See Also:
-
tolerateUndefinedByDefault
protected static boolean tolerateUndefinedByDefault -
exceptionOnUndefinedByDefault
protected static boolean exceptionOnUndefinedByDefault -
allowDenormalByDefault
protected static boolean allowDenormalByDefault -
updateListeners
-
updateListenersLock
-
value
protected double value -
isSet
protected boolean isSet -
tolerateUndefined
protected boolean tolerateUndefined -
exceptionOnUndefined
protected boolean exceptionOnUndefined -
allowDenormal
protected boolean allowDenormal
-
-
Constructor Details
-
Value
public Value() -
Value
- Throws:
ComputationException
-
Value
- Throws:
ComputationException
-
Value
- Throws:
ComputationException
-
Value
- Throws:
ComputationException
-
Value
- 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) -
isValue
-
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
-
reset
public void reset() -
evaluate
- Specified by:
evaluatein interfaceEvaluable- Throws:
ComputationException
-
evaluateToString
- Specified by:
evaluateToStringin interfaceEvaluable- Throws:
ComputationException
-
toString
-
toNotation
- Specified by:
toNotationin interfaceEvaluable- Throws:
ComputationException
-
registerListener
- Specified by:
registerListenerin interfaceUpdatable
-
unregisterListener
- Specified by:
unregisterListenerin interfaceUpdatable
-
notifyListeners
public void notifyListeners()- Specified by:
notifyListenersin interfaceUpdatable
-
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
-
registerAsListener
- Specified by:
registerAsListenerin interfaceUpdatableListener
-
unregisterAsListener
- Specified by:
unregisterAsListenerin interfaceUpdatableListener
-
unregisterAsListener
public void unregisterAsListener()- Specified by:
unregisterAsListenerin interfaceUpdatableListener
-
dataUpdated
- Specified by:
dataUpdatedin interfaceUpdatableListener
-
compareTo
- Specified by:
compareToin interfaceComparable<Value>
-