Package hec.hecmath.computation
Class TextOperation
java.lang.Object
hec.hecmath.computation.TextOperation
- All Implemented Interfaces:
Constants
,Evaluable
,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 Evaluable[]
protected boolean
protected static boolean
protected static Map<Constants.TextOperator,
String> protected Constants.TextOperator
protected static Map<String,
Constants.TextOperator> protected boolean
protected boolean
protected static boolean
protected Set<UpdatableListener>
protected Object
protected Object
protected String
-
Constructor Summary
ConstructorsConstructorDescriptionTextOperation
(Constants.TextOperator op, boolean persistent, Evaluable... args) TextOperation
(Constants.TextOperator op, boolean persistent, List<? extends Evaluable> args) TextOperation
(Constants.TextOperator op, Evaluable... args) TextOperation
(Constants.TextOperator op, List<? extends Evaluable> args) TextOperation
(String name, boolean persistent, Evaluable... args) TextOperation
(String name, boolean persistent, List<? extends Evaluable> args) TextOperation
(String name, Evaluable... args) TextOperation
(String name, List<? extends Evaluable> args) -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static String
protected void
compute()
void
double
evaluate()
boolean
boolean
getName()
getNames()
int
boolean
boolean
isStale()
static boolean
isTextOperation
(String name) static void
void
static int
precedence
(String name) void
void
registerListener
(UpdatableListener listener) void
setAllowDenormal
(boolean setting) void
setExceptionOnUndefined
(boolean setting) void
setTolerateUndefined
(boolean setting) toNotation
(Constants.Notation notation) void
void
void
unregisterListener
(UpdatableListener listener)
-
Field Details
-
tolerateUndefinedByDefault
protected static boolean tolerateUndefinedByDefault -
exceptionOnUndefinedByDefault
protected static boolean exceptionOnUndefinedByDefault -
allowDenormalByDefault
protected static boolean allowDenormalByDefault -
nameByOp
-
opByName
-
value
-
op
-
stale
protected boolean stale -
args
-
tolerateUndefined
protected boolean tolerateUndefined -
exceptionOnUndefined
protected boolean exceptionOnUndefined -
allowDenormal
protected boolean allowDenormal -
updateListeners
-
updateListenersLock
-
updateSources
-
updateSourcesLock
-
-
Constructor Details
-
TextOperation
- Throws:
ComputationException
-
TextOperation
- Throws:
ComputationException
-
TextOperation
public TextOperation(Constants.TextOperator op, List<? extends Evaluable> args) throws ComputationException - Throws:
ComputationException
-
TextOperation
- Throws:
ComputationException
-
TextOperation
public TextOperation(String name, boolean persistent, List<? extends Evaluable> args) throws ComputationException - Throws:
ComputationException
-
TextOperation
public TextOperation(String name, boolean persistent, Evaluable... args) throws ComputationException - Throws:
ComputationException
-
TextOperation
public TextOperation(Constants.TextOperator op, boolean persistent, List<? extends Evaluable> args) throws ComputationException - Throws:
ComputationException
-
TextOperation
public TextOperation(Constants.TextOperator op, boolean persistent, Evaluable... args) throws ComputationException - Throws:
ComputationException
-
-
Method Details
-
getNames
-
isTextOperation
-
arity
-
precedence
-
arityName
-
compute
- Throws:
ComputationException
-
getName
-
getPrecedence
public int getPrecedence() -
isStale
public boolean isStale() -
evaluateToString
- Specified by:
evaluateToString
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
-
dataUpdated
- Specified by:
dataUpdated
in interfaceUpdatableListener
-
registerAsListener
- Specified by:
registerAsListener
in interfaceUpdatableListener
-
unregisterAsListener
- Specified by:
unregisterAsListener
in interfaceUpdatableListener
-
unregisterAsListener
public void unregisterAsListener()- Specified by:
unregisterAsListener
in interfaceUpdatableListener
-
evaluate
- Specified by:
evaluate
in interfaceEvaluable
- Throws:
ComputationException
-
toNotation
- Specified by:
toNotation
in interfaceEvaluable
- Throws:
ComputationException
-
getTolerateUndefined
public boolean getTolerateUndefined()- Specified by:
getTolerateUndefined
in interfaceEvaluable
-
setTolerateUndefined
public void setTolerateUndefined(boolean setting) - Specified by:
setTolerateUndefined
in interfaceEvaluable
-
getExceptionOnUndefined
public boolean getExceptionOnUndefined()- Specified by:
getExceptionOnUndefined
in interfaceEvaluable
-
setExceptionOnUndefined
public void setExceptionOnUndefined(boolean setting) - Specified by:
setExceptionOnUndefined
in interfaceEvaluable
-
getAllowDenormal
public boolean getAllowDenormal()- Specified by:
getAllowDenormal
in interfaceEvaluable
-
setAllowDenormal
public void setAllowDenormal(boolean setting) - Specified by:
setAllowDenormal
in interfaceEvaluable
-
main
- Throws:
Exception
-