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

feat: allow typed interval sub-classes with OverlapDetector #35

Closed
wants to merge 1 commit into from

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Jul 15, 2024

Alternative to #34

Why I like this implementation:

  1. One can subclass Interval and use it add them with OverlapDetector, such that the methods that return intervals are correctly typed (subclass)
  2. Adds a generic class ItemizedInterval that allows a developer to create intervals that have an attribute of a specific type T. Using this class, a developer doesn't need to create a subclass and can "hang" any object type on an ItemizedInterval.

Why I don't like this implementation:

  1. Breaking change: now we need to always specify the interval type when constructing an overlap detector

@nh13 nh13 requested review from tfenne and clintval July 15, 2024 19:13
@nh13 nh13 marked this pull request as ready for review July 15, 2024 19:28
@nh13
Copy link
Member Author

nh13 commented Aug 2, 2024

Closed as #34 is merged.

@nh13 nh13 closed this Aug 2, 2024
@nh13 nh13 deleted the feat/generic-overlap-detector branch August 2, 2024 16:14
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