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 boolean
protected static boolean
protected boolean
protected static boolean
protected boolean
protected boolean
protected static boolean
protected Set<UpdatableListener>
protected Object
protected double
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
void
double
evaluate()
boolean
static boolean
boolean
static boolean
boolean
static boolean
static boolean
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) void
setTolerateUndefined
(boolean setting) static void
setTolerateUndefinedByDefault
(boolean setting) void
setValue
(double value) void
setValue
(int value) void
void
void
toNotation
(Constants.Notation notation) toString()
void
void
void
unregisterListener
(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:
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
-
reset
public void reset() -
evaluate
- Specified by:
evaluate
in interfaceEvaluable
- Throws:
ComputationException
-
evaluateToString
- Specified by:
evaluateToString
in interfaceEvaluable
- Throws:
ComputationException
-
toString
-
toNotation
- Specified by:
toNotation
in interfaceEvaluable
- Throws:
ComputationException
-
registerListener
- Specified by:
registerListener
in interfaceUpdatable
-
unregisterListener
- Specified by:
unregisterListener
in interfaceUpdatable
-
notifyListeners
public void notifyListeners()- Specified by:
notifyListeners
in interfaceUpdatable
-
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
-
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
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Value>
-