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

Consider using Iterable/Collection where possible. #156

Open
marcus-talbot42 opened this issue Oct 17, 2022 · 0 comments
Open

Consider using Iterable/Collection where possible. #156

marcus-talbot42 opened this issue Oct 17, 2022 · 0 comments

Comments

@marcus-talbot42
Copy link
Contributor

In many cases, we use a List simply as the default collection, rather than for a specialised purpose. In such cases, it would be worthwhile to use an Iterable, or a Collection, to improve the flexibility of the library.

E.g.

public interface Configuration {
    ...
    List<String> getDownsizeTarget();
    ...
}

In this case, the method likely does not need to return a List. In all likelihood, Iterable would be an acceptable substitution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant