Skip to content

Commit

Permalink
Override with typed chromatogram getter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Jan 29, 2025
1 parent 756db23 commit f8a44d8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public void dispose() {
}

@Override
public IChromatogramCSD getChromatogramCSD() {
public IChromatogramCSD getChromatogram() {

IChromatogram<?> chromatogram = getChromatogram();
IChromatogram<?> chromatogram = super.getChromatogram();
if(chromatogram instanceof IChromatogramCSD chromatogramCSD) {
return chromatogramCSD;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ public interface IChromatogramSelectionCSD extends IChromatogramSelection<IChrom
* Returns the stored chromatogram.
* May return null.
*
* @deprecated use {@link #getChromatogram()} instead
* @return {@link IChromatogramCSD}
*/
@Deprecated
default IChromatogramCSD getChromatogramCSD() {

return getChromatogram();
}
@Override
IChromatogramCSD getChromatogram();

/**
* Returns the selected scan of the current chromatogram or null, if none is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ public void dispose() {
}

@Override
@Deprecated
public IChromatogramMSD getChromatogramMSD() {
public IChromatogramMSD getChromatogram() {

IChromatogram<?> chromatogram = getChromatogram();
IChromatogram<?> chromatogram = super.getChromatogram();
if(chromatogram instanceof IChromatogramMSD chromatogramMSD) {
return chromatogramMSD;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,10 @@ public interface IChromatogramSelectionMSD extends IChromatogramSelection<IChrom
* Returns the stored chromatogram.
* May return null.
*
* @deprecated use {@link #getChromatogram()} instead
* @return {@link IChromatogramMSD}
*/
@Deprecated
default IChromatogramMSD getChromatogramMSD() {

return getChromatogram();
}
@Override
IChromatogramMSD getChromatogram();

/**
* Returns the selected scan of the current chromatogram or null, if none is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@

public interface IChromatogramSelectionVSD extends IChromatogramSelection<IChromatogramPeakVSD, IChromatogramVSD> {

@Override
IChromatogramVSD getChromatogram();

@Override
IScanVSD getSelectedScan();
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ public void dispose() {
}

@Override
@Deprecated
public IChromatogramWSD getChromatogramWSD() {
public IChromatogramWSD getChromatogram() {

IChromatogram<?> chromatogram = getChromatogram();
IChromatogram<?> chromatogram = super.getChromatogram();
if(chromatogram instanceof IChromatogramWSD chromatogramWSD) {
return chromatogramWSD;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ public interface IChromatogramSelectionWSD extends IChromatogramSelection<IChrom
* Returns the stored chromatogram.
* May return null.
*
* @deprecated use {@link #getChromatogram()} instead
* @return {@link IChromatogramWSD}
*/
@Deprecated
default IChromatogramWSD getChromatogramWSD() {

return getChromatogram();
}
@Override
IChromatogramWSD getChromatogram();

/**
* Returns the selected scan of the current chromatogram or null, if none is
Expand Down

0 comments on commit f8a44d8

Please sign in to comment.