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.OptionManagerm_OptionManagerfor managing the available options.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSpectrumComparator()The default constructor uses comparison in ascending manner.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringascendingTipText()Returns the tip text for this property.voidcleanUpOptions()Cleans up the options.voiddefineOptions()Adds options to the internal list of options.voiddestroy()Frees up memory in a "destructive" non-reversible way.protected voidfinishInit()Finishes the initialization in the constructor.adams.core.option.OptionManagergetOptionManager()Returns the option manager.abstract StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.protected adams.core.option.OptionManagernewOptionManager()Returns a new instance of the option manager.protected voidreset()Resets the scheme.voidsetAscending(boolean value)Sets whether to sort in ascending manner.StringtoCommandLine()Returns the commandline string.StringtoString()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:
defineOptionsin 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:
getOptionManagerin 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:
cleanUpOptionsin interfaceadams.core.option.OptionHandler
-
destroy
public void destroy()
Frees up memory in a "destructive" non-reversible way.
Cleans up the options.- Specified by:
destroyin 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:
toCommandLinein interfaceadams.core.option.OptionHandler- Returns:
- the commandline
-
-