Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid generic parameters in Chromatogram(Selection) #2068

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Mailaender
Copy link
Contributor

This is a gigantic API change with the aim of removing generic parameters from commonly used API which introduces numerous wildcard characters that should be avoided especially in method returns, and it causes many warnings because type checks fail. I see that the root cause is the way that Java generics are limited by not allowing implementing generic interfaces again, making lists with bound generic types read-only etc.

But it is also conceptually wrong to define a chromatogram by its peak (and which only differ slightly by peak model MSD) and not its scans, which are defining content. Doing both would probably create even harder to read/maintain code, so I try to put the generic types into lists instead and override the interfaces. This is still using generics but defined by inheritance, which is nearer to the legacy code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant