Package adams.data.spectrum
Class SpectrumComparatorByReportValue
- java.lang.Object
-
- adams.data.container.DataPointComparator<Spectrum>
-
- adams.data.spectrum.AbstractSpectrumComparator
-
- adams.data.spectrum.SpectrumComparatorByReportValue
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.option.OptionHandler
,Serializable
,Comparator<Spectrum>
public class SpectrumComparatorByReportValue extends AbstractSpectrumComparator
Compares spectra based on the specified report field value.- 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.Field
m_Field
the field to use.-
Fields inherited from class adams.data.spectrum.AbstractSpectrumComparator
m_OptionManager
-
-
Constructor Summary
Constructors Constructor Description SpectrumComparatorByReportValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Spectrum o1, Spectrum o2)
Compares its two arguments for order.void
defineOptions()
Adds options to the internal list of options.String
fieldTipText()
Returns the tip text for this property.adams.data.report.Field
getField()
Returns the field to inspect.String
globalInfo()
Returns a string describing the object.void
setField(adams.data.report.Field value)
Sets the field to inspect.-
Methods inherited from class adams.data.spectrum.AbstractSpectrumComparator
ascendingTipText, cleanUpOptions, destroy, finishInit, getOptionManager, initialize, newOptionManager, reset, setAscending, toCommandLine, toString
-
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 String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in classAbstractSpectrumComparator
- 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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractSpectrumComparator
-
setField
public void setField(adams.data.report.Field value)
Sets the field to inspect.- Parameters:
value
- the field
-
getField
public adams.data.report.Field getField()
Returns the field to inspect.- 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.
-
compare
public int compare(Spectrum o1, Spectrum o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.- Specified by:
compare
in interfaceComparator<Spectrum>
- Specified by:
compare
in classadams.data.container.DataPointComparator<Spectrum>
- Parameters:
o1
- the first objecto2
- the second object- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
-
-