Package adams.data.spectrum
Class AbstractSpectrumComparator
- java.lang.Object
-
- adams.data.container.DataPointComparator<Spectrum>
-
- adams.data.spectrum.AbstractSpectrumComparator
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.option.OptionHandler
,Serializable
,Comparator<Spectrum>
- Direct Known Subclasses:
SpectrumComparator
,SpectrumComparatorByReportValue
public abstract class AbstractSpectrumComparator extends adams.data.container.DataPointComparator<Spectrum> implements adams.core.option.OptionHandler
Ancestor for spectrum comparators.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.option.OptionManager
m_OptionManager
for managing the available options.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSpectrumComparator()
The default constructor uses comparison in ascending manner.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
ascendingTipText()
Returns the tip text for this property.void
cleanUpOptions()
Cleans up the options.void
defineOptions()
Adds options to the internal list of options.void
destroy()
Frees up memory in a "destructive" non-reversible way.protected void
finishInit()
Finishes the initialization in the constructor.adams.core.option.OptionManager
getOptionManager()
Returns the option manager.abstract String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.protected adams.core.option.OptionManager
newOptionManager()
Returns a new instance of the option manager.protected void
reset()
Resets the scheme.void
setAscending(boolean value)
Sets whether to sort in ascending manner.String
toCommandLine()
Returns the commandline string.String
toString()
Returns a string representation of the options.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
globalInfo
public abstract String globalInfo()
Returns a string describing the object.- Returns:
- a description suitable for displaying in the gui
-
initialize
protected void initialize()
Initializes the members.
-
reset
protected void reset()
Resets the scheme. Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
-
newOptionManager
protected adams.core.option.OptionManager newOptionManager()
Returns a new instance of the option manager.- Returns:
- the manager to use
-
defineOptions
public void defineOptions()
Adds options to the internal list of options. Derived classes must override this method to add additional options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
-
finishInit
protected void finishInit()
Finishes the initialization in the constructor.
-
getOptionManager
public adams.core.option.OptionManager getOptionManager()
Returns the option manager.- Specified by:
getOptionManager
in interfaceadams.core.option.OptionHandler
- Returns:
- the manager
-
setAscending
public void setAscending(boolean value)
Sets whether to sort in ascending manner.- Parameters:
value
- true if ascending
-
ascendingTipText
public String ascendingTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
cleanUpOptions
public void cleanUpOptions()
Cleans up the options.- Specified by:
cleanUpOptions
in interfaceadams.core.option.OptionHandler
-
destroy
public void destroy()
Frees up memory in a "destructive" non-reversible way.
Cleans up the options.- Specified by:
destroy
in interfaceadams.core.Destroyable
- See Also:
cleanUpOptions()
-
toString
public String toString()
Returns a string representation of the options.
-
toCommandLine
public String toCommandLine()
Returns the commandline string.- Specified by:
toCommandLine
in interfaceadams.core.option.OptionHandler
- Returns:
- the commandline
-
-