public class Peak extends ExperimentObject
Modifier and Type | Field and Description |
---|---|
static Comparator<Peak> |
AscendingIntensityComparator
This comparator compares two Peak instances on ascending intensity.
|
static Comparator<Peak> |
AscendingMzComparator
This comparator compares two Peak instances on ascending m/z value.
|
static Comparator<Peak> |
DescendingIntensityComparator
This comparator compares two Peak instances on descending intensity.
|
double |
intensity
The intensity of the peak.
|
double |
mz
The mass over charge ratio of the peak.
|
double |
rt
The retention time when the peak was recorded.
|
Constructor and Description |
---|
Peak(double mz,
double intensity)
Constructor for a peak.
|
Peak(double mz,
double intensity,
double rt)
Constructor for a peak.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Peak p)
Compare two peaks in regards to their intensity.
|
boolean |
equals(Object obj) |
double |
getIntensity()
Returns the intensity.
|
double |
getMass(int chargeValue)
Returns the mass of the compound with the given charge.
|
double |
getMz()
Returns the mz.
|
int |
hashCode() |
boolean |
isSameAs(Peak aPeak)
Returns true if the peak has the same mz and intensity.
|
void |
setIntensity(double intensity)
Set the intensity.
|
void |
setMz(double mz)
Set the mz.
|
addUrParam, getParameterKey, getUrParam
public double mz
public double rt
public double intensity
public static final Comparator<Peak> AscendingIntensityComparator
public static final Comparator<Peak> DescendingIntensityComparator
public static final Comparator<Peak> AscendingMzComparator
public Peak(double mz, double intensity)
mz
- the mz value of the peakintensity
- the intensity of the peakpublic Peak(double mz, double intensity, double rt)
mz
- the mz value of the peakintensity
- the intensity of the peakrt
- the retention time when the peak was recordedpublic boolean isSameAs(Peak aPeak)
aPeak
- the peal to compare this peak topublic double getMz()
public void setMz(double mz)
mz
- the value to setpublic double getIntensity()
public void setIntensity(double intensity)
intensity
- the intensity to setpublic int compareTo(Peak p)
p
- the peak to compare againstpublic double getMass(int chargeValue)
chargeValue
- the value of the chargeCopyright © 2016. All rights reserved.