Package adams.data.filter
Class AbstractPreFilter<T extends DataContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<T>
-
- adams.data.filter.AbstractPreFilter<T>
-
- Type Parameters:
T- the data to process
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<Filter>,SizeOfHandler,Filter<T>,Serializable,Comparable
public abstract class AbstractPreFilter<T extends DataContainer> extends AbstractFilter<T>
Abstract ancestor for filters that use pre-filtered data as the basis for manipulating the original data.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected Filterm_Filterthe filter to apply to the data first.-
Fields inherited from class adams.data.filter.AbstractFilter
m_DontUpdateID
-
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 AbstractPreFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringfilterTipText()Returns the tip text for this property.protected FiltergetDefaultFilter()Returns the default pre-filter to use.FiltergetFilter()Returns the current pre-filter.StringglobalInfo()Returns a string describing the object.protected TprocessData(T data)Performs the actual filtering.protected abstract TprocessData(T filtered, T original)Performs the actual filtering, using the pre-filtered data to manipulate the original data.voidsetFilter(Filter value)Sets the pre-filter.-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Filter
protected Filter m_Filter
the filter to apply to the data first.
-
-
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 classAbstractFilter<T extends DataContainer>
-
getDefaultFilter
protected Filter getDefaultFilter()
Returns the default pre-filter to use.- Returns:
- the default
-
setFilter
public void setFilter(Filter value)
Sets the pre-filter.- Parameters:
value- the filter
-
getFilter
public Filter getFilter()
Returns the current pre-filter.- Returns:
- the filter
-
filterTipText
public String filterTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
processData
protected abstract T processData(T filtered, T original)
Performs the actual filtering, using the pre-filtered data to manipulate the original data.- Parameters:
filtered- the pref-filtered dataoriginal- the original input data- Returns:
- the final data
-
processData
protected T processData(T data)
Performs the actual filtering.- Specified by:
processDatain classAbstractFilter<T extends DataContainer>- Parameters:
data- the data to filter- Returns:
- the filtered data
-
-