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

Remove subList check or make it smarter #528

Open
Luro02 opened this issue May 13, 2024 · 1 comment
Open

Remove subList check or make it smarter #528

Luro02 opened this issue May 13, 2024 · 1 comment
Labels
enhancement New feature or request high-priority Issues that should be solved as soon as possible

Comments

@Luro02
Copy link
Collaborator

Luro02 commented May 13, 2024

Description

The current implementation isn't any better than using a for-loop. Maybe only suggest this as an extension to .addAll? Like here:

for (int i = start; i < end; i++) {
  result.add(list.get(i));
}
// -> replace with result.addAll(list.subList(start, end));
@Luro02 Luro02 added the enhancement New feature or request label May 13, 2024
@Luro02 Luro02 added the high-priority Issues that should be solved as soon as possible label Jul 8, 2024
@Luro02
Copy link
Collaborator Author

Luro02 commented Jul 14, 2024

One use for sublist is when one can replace the entire loop with a single subList expression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority Issues that should be solved as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant