Class Peak
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.mass_spectrometry.spectra.Peak
- All Implemented Interfaces:
Serializable
public class Peak extends ExperimentObject
This class represents a peak.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field 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. -
Constructor Summary
-
Method Summary
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
mz
public final double mzThe mass over charge ratio of the peak. -
intensity
public final double intensityThe intensity of the peak. -
AscendingIntensityComparator
This comparator compares two Peak instances on ascending intensity. -
DescendingIntensityComparator
This comparator compares two Peak instances on descending intensity. -
AscendingMzComparator
This comparator compares two Peak instances on ascending m/z value.
-
-
Constructor Details
-
Method Details
-
isSameAs
Returns true if the peak has the same mz and intensity.- Parameters:
aPeak
- the peal to compare this peak to- Returns:
- true if the peak has the same mz and intensity
-
hashCode
public int hashCode() -
equals
-
getMass
public double getMass(int chargeValue)Returns the mass of the compound with the given charge.- Parameters:
chargeValue
- the value of the charge- Returns:
- the mass of the compound with the given charge
-
toString
-