Package adams.flow.condition.bool
Class HasCell
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<BooleanCondition>
,SizeOfHandler
,Stoppable
,BooleanCondition
,Serializable
public class HasCell extends AbstractBooleanCondition
Checks whether the specified cell is present in the spreadsheet and has a value. If a value is specified, it also checks whether the cell value is the same.
-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
-row <adams.data.spreadsheet.SpreadSheetRowIndex> (property: row) The row to check. default: 1 example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
-column <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: column) The column to check. default: 1 example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.
-value <java.lang.String> (property: value) The optional value to check against, ignored if empty. default:
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetColumnIndex
m_Column
the column.protected SpreadSheetRowIndex
m_Row
the row.protected String
m_Value
the optional value.-
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 HasCell()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the class that the consumer accepts.String
columnTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected boolean
doEvaluate(Actor owner, Token token)
Performs the actual evaluation.SpreadSheetColumnIndex
getColumn()
Returns the column to check.String
getQuickInfo()
Returns the quick info string to be displayed in the flow editor.SpreadSheetRowIndex
getRow()
Returns the row to check.String
getValue()
Returns the optional value to check, ignored if empty.String
globalInfo()
Returns a string describing the object.String
rowTipText()
Returns the tip text for this property.void
setColumn(SpreadSheetColumnIndex value)
Sets the column to check.void
setRow(SpreadSheetRowIndex value)
Sets the row to check.void
setValue(String value)
Sets the optional value to check, ignored if empty.String
valueTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition
evaluate, preEvaluate, setUp, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, 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_Row
protected SpreadSheetRowIndex m_Row
the row.
-
m_Column
protected SpreadSheetColumnIndex m_Column
the column.
-
m_Value
protected String m_Value
the optional value.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setRow
public void setRow(SpreadSheetRowIndex value)
Sets the row to check.- Parameters:
value
- the row
-
getRow
public SpreadSheetRowIndex getRow()
Returns the row to check.- Returns:
- the row
-
rowTipText
public String rowTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setColumn
public void setColumn(SpreadSheetColumnIndex value)
Sets the column to check.- Parameters:
value
- the column
-
getColumn
public SpreadSheetColumnIndex getColumn()
Returns the column to check.- Returns:
- the column
-
columnTipText
public String columnTipText()
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 optional value to check, ignored if empty.- Parameters:
value
- the value
-
getValue
public String getValue()
Returns the optional value to check, ignored if empty.- 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:
getQuickInfo
in interfaceBooleanCondition
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Specified by:
getQuickInfo
in 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:
accepts
in interfaceBooleanCondition
- Specified by:
accepts
in classAbstractBooleanCondition
- Returns:
- adams.flow.core.Unknown.class
-
doEvaluate
protected boolean doEvaluate(Actor owner, Token token)
Performs the actual evaluation.- Specified by:
doEvaluate
in classAbstractBooleanCondition
- Parameters:
owner
- the owning actortoken
- the current token passing through- Returns:
- the result of the evaluation
-
-