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.Fieldm_Fieldthe 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 intcompare(Spectrum o1, Spectrum o2)Compares its two arguments for order.voiddefineOptions()Adds options to the internal list of options.StringfieldTipText()Returns the tip text for this property.adams.data.report.FieldgetField()Returns the field to inspect.StringglobalInfo()Returns a string describing the object.voidsetField(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:
globalInfoin classAbstractSpectrumComparator- 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 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:
comparein interfaceComparator<Spectrum>- Specified by:
comparein 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.
-
-