Skip to content

Commit

Permalink
Workaround duplicate peaks not being selected in Peak/Scan list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Feb 26, 2025
1 parent ea23b40 commit 92c25fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2014, 2020 Lablicate GmbH.
* Copyright (c) 2014, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -28,6 +28,7 @@ public abstract class AbstractChromatogramPeakCSD extends AbstractPeakCSD implem
* @throws PeakException
*/
public AbstractChromatogramPeakCSD(IPeakModelCSD peakModel, IChromatogramCSD chromatogram) throws IllegalArgumentException, PeakException {

super(peakModel);
validateChromatogram(chromatogram);
validateRetentionTimes(chromatogram, peakModel);
Expand All @@ -39,6 +40,7 @@ public AbstractChromatogramPeakCSD(IPeakModelCSD peakModel, IChromatogramCSD chr
}

public AbstractChromatogramPeakCSD(IPeakModelCSD peakModel, IChromatogramCSD chromatogram, String modelDescription) throws IllegalArgumentException, PeakException {

this(peakModel, chromatogram);
setModelDescription(modelDescription);
}
Expand Down Expand Up @@ -84,22 +86,6 @@ public IChromatogramCSD getChromatogram() {
return chromatogram;
}

@Override
public boolean equals(Object otherObject) {

if(this == otherObject) {
return true;
}
if(otherObject == null) {
return false;
}
if(getClass() != otherObject.getClass()) {
return false;
}
AbstractChromatogramPeakCSD other = (AbstractChromatogramPeakCSD)otherObject;
return getPeakModel().equals(other.getPeakModel()) && chromatogram == other.getChromatogram();
}

@Override
public int hashCode() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2023 Lablicate GmbH.
* Copyright (c) 2018, 2025 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -107,22 +107,6 @@ public IChromatogramWSD getChromatogram() {
return chromatogram;
}

@Override
public boolean equals(Object otherObject) {

if(this == otherObject) {
return true;
}
if(otherObject == null) {
return false;
}
if(getClass() != otherObject.getClass()) {
return false;
}
AbstractChromatogramPeakWSD other = (AbstractChromatogramPeakWSD)otherObject;
return getPeakModel().equals(other.getPeakModel()) && chromatogram == other.getChromatogram();
}

@Override
public int hashCode() {

Expand Down

0 comments on commit 92c25fa

Please sign in to comment.