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

Simplify class Interval #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merkste
Copy link
Contributor

@merkste merkste commented Sep 4, 2020

By making Interval generic, the code is simplified.

Please note that restricting the generic type to <T extends Number>
is not possible yet, as this breaks code dealing with type Object only.

@davexparker
Copy link
Member

In another branch, I have a new generic Interval class, but created in the common package. My plan was to migrate to that where used, and then deprecate this one later.

Btw, what's the missing text above "restricting the generic type to..."?

@merkste
Copy link
Contributor Author

merkste commented Sep 4, 2020

common.iterable also contains a class Interval. It is quite similar to RangeIntIterable. In the context of #57 I am about to integrate both into one class to get rid of the duplication.

@merkste
Copy link
Contributor Author

merkste commented Sep 4, 2020

Btw, what's the missing text above "restricting the generic type to..."?

This ist just GitHub stripping everything between angle brackets. In this case < T extends Number>.

By making Interval generic, the code is simplified.

Please note that restricting the generic type to <T extends Number>
is not possible yet, as this breaks code dealing with type Object only.
@merkste merkste force-pushed the simplify-interval branch from 34b6384 to 8a20d38 Compare August 27, 2021 19:18
@davexparker davexparker force-pushed the master branch 2 times, most recently from ca12ca0 to 6bf73df Compare January 12, 2024 14:23
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.

2 participants