Package adams.flow.condition.bool
Class ReportValueMatches
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.condition.bool.AbstractBooleanCondition
-
- adams.flow.condition.bool.ReportValueMatches
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,ShallowCopySupporter<BooleanCondition>,SizeOfHandler,Stoppable,BooleanCondition,Serializable
public class ReportValueMatches extends AbstractBooleanCondition
Returns 'true' if the field in the report is present and has the specified value.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING min-user-mode: Expert
-field <adams.data.report.Field> (property: field) The field that must exist. default:
-value <java.lang.String> (property: value) The required value for the field. default:
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Fieldm_Fieldthe field in the report to check.protected Stringm_Valuethe required value of the field.protected Booleanm_ValueBooleanthe boolean value.protected Doublem_ValueNumericthe numeric value.protected booleanm_ValueParsedwhether the values have been parsed.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ReportValueMatches()Default constructor.ReportValueMatches(Field field, String value)Initializes with the specified field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]accepts()Returns the class that the consumer accepts.voiddefineOptions()Adds options to the internal list of options.protected booleandoEvaluate(Actor owner, Token token)Performs the actual evaluation.StringfieldTipText()Returns the tip text for this property.FieldgetField()Returns the field to look for in the report.StringgetQuickInfo()Returns the quick info string to be displayed in the flow editor.StringgetValue()Returns the required value for the field.StringglobalInfo()Returns a string describing the object.protected voidreset()Resets the scheme.voidsetField(Field value)Sets the field to look for in the report.StringsetUp(Actor owner)Configures the condition.voidsetValue(String value)Sets the required value for the field.StringvalueTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition
evaluate, preEvaluate, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Field
protected Field m_Field
the field in the report to check.
-
m_Value
protected String m_Value
the required value of the field.
-
m_ValueParsed
protected transient boolean m_ValueParsed
whether the values have been parsed.
-
m_ValueNumeric
protected transient Double m_ValueNumeric
the numeric value.
-
m_ValueBoolean
protected transient Boolean m_ValueBoolean
the boolean value.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
setField
public void setField(Field value)
Sets the field to look for in the report.- Parameters:
value- the field
-
getField
public Field getField()
Returns the field to look for in the report.- Returns:
- the field
-
fieldTipText
public String fieldTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setValue
public void setValue(String value)
Sets the required value for the field.- Parameters:
value- the value
-
getValue
public String getValue()
Returns the required value for the field.- Returns:
- the value
-
valueTipText
public String valueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns the quick info string to be displayed in the flow editor.- Specified by:
getQuickInfoin interfaceBooleanCondition- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Specified by:
getQuickInfoin classAbstractBooleanCondition- Returns:
- the info or null if no info to be displayed
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
acceptsin interfaceBooleanCondition- Specified by:
acceptsin classAbstractBooleanCondition- Returns:
- ReportHandler, Report
-
setUp
public String setUp(Actor owner)
Configures the condition.- Specified by:
setUpin interfaceBooleanCondition- Overrides:
setUpin classAbstractBooleanCondition- Parameters:
owner- the actor this condition belongs to- Returns:
- null if everything is fine, otherwise error message
-
doEvaluate
protected boolean doEvaluate(Actor owner, Token token)
Performs the actual evaluation.- Specified by:
doEvaluatein classAbstractBooleanCondition- Parameters:
owner- the owning actortoken- the current token passing through- Returns:
- the result of the evaluation
-
-