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

Add nextCircularListIndex to KiwiLists #1240

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

sleberknight
Copy link
Member

This method handles the simple calculation of getting the next index of a circular list (or array), wrapping around to the beginning when at the end. It also provides input validation on the list size and index.

I am adding this because, rather unbelievably, I was not able to find something like it in any "standard" utility libraries (Google Guava, Apache Commons Lang or Collections), etc. Maybe one exists, but I could not find it. The closest I found was the CircularFifoQueue in Apache Commons Collections.

This method handles the simple calculation of getting the
next index of a circular list (or array), wrapping around
to the beginning when at the end. It also provides input
validation on the list size and index.

I am adding this because, rather unbelievably, I was not
able to find something like it in any "standard" utility
libraries (Google Guava, Apache Commons Lang or Collections),
etc. Maybe one exists, but I could not find it. The closest
I found was the CircularFifoQueue in Apache Commons Collections.
@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Jan 11, 2025
@sleberknight sleberknight added this to the 4.7.0 milestone Jan 11, 2025
@sleberknight sleberknight self-assigned this Jan 11, 2025
@sleberknight sleberknight merged commit 61c043a into main Jan 11, 2025
6 checks passed
@sleberknight sleberknight deleted the add-nextCircularListIndex-to-KiwiLists branch January 11, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant