Package adams.data.cleaner.spectrum
Class MinMax
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.cleaner.spectrum.AbstractCleaner
-
- adams.data.cleaner.spectrum.MinMax
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.ShallowCopySupporter<AbstractCleaner>,adams.core.SizeOfHandler,Serializable,Comparable
public class MinMax extends AbstractCleaner
Checks a field in the sample data whether the value is within a certain range.
Valid options are:
-D (property: debug) If set to true, scheme may output additional info to the console.-field <knir.data.sampledata.Field> (property: field) The field in the sample data to check. default: knir.data.sampledata.Field-min <double> (property: minimum) The minimum value the field is allowed to have (inclusive). default: 0.0-max <double> (property: maximum) Only every n-th point will be output. default: 1000.0- Version:
- $Revision: 2242 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.data.report.Fieldm_Fieldthe field in the sample data to check.protected doublem_Maximumthe maximum value of the field.protected doublem_Minimumthe minimum value of the field.-
Fields inherited from class adams.data.cleaner.spectrum.AbstractCleaner
m_ActualPreFilter, m_FlowContext, m_PreFilter
-
-
Constructor Summary
Constructors Constructor Description MinMax()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringfieldTipText()Returns the tip text for this property.adams.data.report.FieldgetField()Returns the field in use.doublegetMaximum()Returns the maximum value the field is allowed to have (incl).doublegetMinimum()Returns the minimum value the field can have (incl.).StringglobalInfo()Returns a string describing the object.StringmaximumTipText()Returns the tip text for this property.StringminimumTipText()Returns the tip text for this property.protected StringperformCheck(Spectrum data)Performs the actual check.voidsetField(adams.data.report.Field value)Sets the field to use.voidsetMaximum(double value)Sets maximum value the field is allowed to have (incl).voidsetMinimum(double value)Sets the minimum value the field can have (incl.).-
Methods inherited from class adams.data.cleaner.spectrum.AbstractCleaner
check, compareTo, equals, forCommandLine, forName, getCleaners, getFlowContext, getPreFilter, preCheck, preFilter, preFilterTipText, reset, setFlowContent, setPreFilter, shallowCopy, shallowCopy
-
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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractCleaner
-
setField
public void setField(adams.data.report.Field value)
Sets the field to use.- Parameters:
value- the field to use
-
getField
public adams.data.report.Field getField()
Returns the field in use.- 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.
-
setMinimum
public void setMinimum(double value)
Sets the minimum value the field can have (incl.).- Parameters:
value- the minimum
-
getMinimum
public double getMinimum()
Returns the minimum value the field can have (incl.).- Returns:
- the minimum
-
minimumTipText
public String minimumTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMaximum
public void setMaximum(double value)
Sets maximum value the field is allowed to have (incl).- Parameters:
value- the maximum
-
getMaximum
public double getMaximum()
Returns the maximum value the field is allowed to have (incl).- Returns:
- the maximum
-
maximumTipText
public String maximumTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
performCheck
protected String performCheck(Spectrum data)
Performs the actual check.- Specified by:
performCheckin classAbstractCleaner- Parameters:
data- the spectrum to check- Returns:
- null if ok, otherwise error message
-
-