Skip to content

Consider using Iterable/Collection where possible. #156

@marcus-talbot42

Description

@marcus-talbot42

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions