Package adams.data.spectrum
Class MultiSpectrum
- java.lang.Object
-
- adams.data.container.AbstractDataContainer<Spectrum>
-
- adams.data.spectrum.MultiSpectrum
-
- All Implemented Interfaces:
adams.core.CloneHandler,adams.core.Mergeable<adams.data.container.DataContainer>,adams.core.UniqueIDHandler,adams.data.container.DataContainer<Spectrum>,adams.data.container.DataPoint,adams.data.id.IDHandler,adams.data.id.MutableIDHandler,adams.data.NotesHandler,adams.data.report.MutableReportHandler<SampleData>,adams.data.report.ReportHandler<SampleData>,Serializable,Comparable,Iterable<Spectrum>,Collection<Spectrum>
public class MultiSpectrum extends adams.data.container.AbstractDataContainer<Spectrum> implements adams.data.container.DataPoint, adams.data.report.MutableReportHandler<SampleData>, adams.data.NotesHandler
For storing multiple spectra.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static adams.data.container.DataPointComparator<Spectrum>m_Comparatorthe default comparator.protected AbstractSpectrumComparatorm_CustomComparatora custom comparator.protected adams.data.Notesm_Notesthe notes for the chromatogram.protected adams.data.container.DataContainerm_Parentthe parent.protected SampleDatam_SampleDatathe report.
-
Constructor Summary
Constructors Constructor Description MultiSpectrum()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(adams.data.container.DataContainer<Spectrum> other)Obtains the stored variables from the other data point, but not the actual data points.voidassign(adams.data.container.DataPoint other)Obtains the stored variables from the other data point.adams.data.container.DataPointComparator<Spectrum>getComparator()Returns the comparator in use (custom one if defined, otherwise the default one).AbstractSpectrumComparatorgetCustomComparator()Returns the custom comparaor in use.adams.data.NotesgetNotes()Returns the currently stored notes.adams.data.container.DataContainergetParent()Returns the container this point belongs to.SampleDatagetReport()get sample data.booleanhasParent()Returns whether the point belongs to a container.booleanhasReport()Returns whether sample data is present.adams.data.container.DataPointComparator<Spectrum>newComparator()Returns a new instance of the default comparator.SpectrumnewPoint()Returns a new instance of a DataContainer point.voidsetCustomComparator(AbstractSpectrumComparator value)Sets the custom comparator to use.voidsetParent(adams.data.container.DataContainer value)Sets the container this point belongs to.voidsetReport(SampleData value)Set sample data.StringtoString()Returns a string representation of the sequence.-
Methods inherited from class adams.data.container.AbstractDataContainer
add, addAll, clear, compareTo, compareToData, compareToHeader, contains, containsAll, ensureCapacity, equals, equalsData, equalsHeader, getClone, getHeader, getID, getUniqueID, hashCode, isEmpty, iterator, mergeWith, modifiedListener, newInstance, remove, removeAll, retainAll, setID, size, toArray, toArray, toList, toList, toTreeSet, toTreeSet, trimToSize
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
m_SampleData
protected SampleData m_SampleData
the report.
-
m_Comparator
protected static adams.data.container.DataPointComparator<Spectrum> m_Comparator
the default comparator.
-
m_Parent
protected adams.data.container.DataContainer m_Parent
the parent.
-
m_Notes
protected adams.data.Notes m_Notes
the notes for the chromatogram.
-
m_CustomComparator
protected AbstractSpectrumComparator m_CustomComparator
a custom comparator.
-
-
Method Detail
-
newComparator
public adams.data.container.DataPointComparator<Spectrum> newComparator()
Returns a new instance of the default comparator.- Specified by:
newComparatorin interfaceadams.data.container.DataContainer<Spectrum>- Returns:
- the comparator instance
-
getComparator
public adams.data.container.DataPointComparator<Spectrum> getComparator()
Returns the comparator in use (custom one if defined, otherwise the default one).- Specified by:
getComparatorin interfaceadams.data.container.DataContainer<Spectrum>- Returns:
- the comparator in use
-
setCustomComparator
public void setCustomComparator(AbstractSpectrumComparator value)
Sets the custom comparator to use.- Parameters:
value- the comparator to use, null to unset
-
getCustomComparator
public AbstractSpectrumComparator getCustomComparator()
Returns the custom comparaor in use.- Returns:
- the custom comparator, null if none set
-
setParent
public void setParent(adams.data.container.DataContainer value)
Sets the container this point belongs to.- Specified by:
setParentin interfaceadams.data.container.DataPoint- Parameters:
value- the container
-
getParent
public adams.data.container.DataContainer getParent()
Returns the container this point belongs to.- Specified by:
getParentin interfaceadams.data.container.DataPoint- Returns:
- the container, can be null
-
hasParent
public boolean hasParent()
Returns whether the point belongs to a container.- Specified by:
hasParentin interfaceadams.data.container.DataPoint- Returns:
- true if the point belongs to a container
-
assign
public void assign(adams.data.container.DataPoint other)
Obtains the stored variables from the other data point.- Specified by:
assignin interfaceadams.data.container.DataPoint- Parameters:
other- the data point to get the values from
-
assign
public void assign(adams.data.container.DataContainer<Spectrum> other)
Obtains the stored variables from the other data point, but not the actual data points.
-
newPoint
public Spectrum newPoint()
Returns a new instance of a DataContainer point.- Specified by:
newPointin interfaceadams.data.container.DataContainer<Spectrum>- Returns:
- the new DataContainer point
-
hasReport
public boolean hasReport()
Returns whether sample data is present.- Specified by:
hasReportin interfaceadams.data.report.ReportHandler<SampleData>- Returns:
- true if sample data present
-
setReport
public void setReport(SampleData value)
Set sample data. Also sets the database ID and sample ID in the sample data (without "'").- Specified by:
setReportin interfaceadams.data.report.MutableReportHandler<SampleData>- Parameters:
value- the sample data
-
getReport
public SampleData getReport()
get sample data.- Specified by:
getReportin interfaceadams.data.report.ReportHandler<SampleData>- Returns:
- the sample data
-
getNotes
public adams.data.Notes getNotes()
Returns the currently stored notes.- Specified by:
getNotesin interfaceadams.data.NotesHandler- Returns:
- the current notes
-
-