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.
|
NO_KEY
Constructor and Description |
---|
Peak()
Empty default constructor
|
Peak(double mz,
double intensity)
Constructor for a peak.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double |
getMass(int chargeValue)
Returns the mass of the compound with the given charge.
|
int |
hashCode() |
boolean |
isSameAs(Peak aPeak)
Returns true if the peak has the same mz and intensity.
|
String |
toString() |
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
public final double mz
public final double intensity
public static final Comparator<Peak> AscendingIntensityComparator
public static final Comparator<Peak> DescendingIntensityComparator
public static final Comparator<Peak> AscendingMzComparator
public Peak()
public Peak(double mz, double intensity)
mz
- the mz value of the peakintensity
- the intensity of the peakpublic boolean isSameAs(Peak aPeak)
aPeak
- the peal to compare this peak topublic double getMass(int chargeValue)
chargeValue
- the value of the chargeCopyright © 2021. All rights reserved.