Package adams.flow.condition.test
Class MultiCondition
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.condition.test.AbstractTestCondition
-
- adams.flow.condition.test.MultiCondition
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<TestCondition>
,SizeOfHandler
,TestCondition
,Serializable
,Comparable
public class MultiCondition extends AbstractTestCondition
Checks multiple conditions. Stops checking when the first fails.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.
-condition <adams.flow.condition.AbstractCondition> [-condition ...] (property: subConditions) The conditions to check.
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractTestCondition[]
m_Conditions
the sub-conditions to check.-
Fields inherited from class adams.flow.condition.test.AbstractTestCondition
m_Tested, m_TestResult
-
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 MultiCondition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.AbstractTestCondition[]
getSubConditions()
Returns the conditions to check.String
globalInfo()
Returns a string describing the object.protected String
performTest()
Performs the actual testing of the condition.void
setSubConditions(AbstractTestCondition[] value)
Sets the conditions to use.String
subConditionsTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.condition.test.AbstractTestCondition
compareTo, equals, forCommandLine, forName, getConditions, getQuickInfo, getTestResult, initialize, reset, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Conditions
protected AbstractTestCondition[] m_Conditions
the sub-conditions to check.
-
-
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
-
setSubConditions
public void setSubConditions(AbstractTestCondition[] value)
Sets the conditions to use.- Parameters:
value
- the conditions
-
getSubConditions
public AbstractTestCondition[] getSubConditions()
Returns the conditions to check.- Returns:
- the conditions
-
subConditionsTipText
public String subConditionsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
performTest
protected String performTest()
Performs the actual testing of the condition.- Specified by:
performTest
in classAbstractTestCondition
- Returns:
- the test result, null if everything OK, otherwise the error message
-
-