Skip to content

[wpimath] Update parameter type from list to collection in Java nearest methods #8020

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

Merged

Conversation

MichaelLesirge
Copy link
Contributor

@MichaelLesirge MichaelLesirge commented Jun 13, 2025

Update parameter type of nearest() methods on geometry classes in Java to take in a Collection instead of specifically a List. This is helpful because Collection is a super interface of List, letting the function take in more general data instead of unnecessarily requiring ordered lists.

This requires no change of the method itself and keeps the same functionality.

Fixes #7873

@MichaelLesirge MichaelLesirge requested a review from a team as a code owner June 13, 2025 18:14
@github-actions github-actions bot added the component: wpimath Math library label Jun 13, 2025
@MichaelLesirge MichaelLesirge changed the title [wpimath] Update parameter type from list to general collection [wpimath] Update parameter type from list to collection in Java nearest methods Jun 13, 2025
@PeterJohnson PeterJohnson merged commit e2517b7 into wpilibsuite:main Jun 15, 2025
44 checks passed
@MichaelLesirge MichaelLesirge deleted the nearest-method-collection-type branch June 15, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Geometry nearest functions should take generic collection
3 participants