-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Milestone
Description
Currently the method from ${subject} looks like this:
public <C extends Collection<?>> SequenceWriter writeAll(C container) throws IOException {
for (Object value : container) {
write(value);
}
return this;
}
The only assumption on the container is therefore it can be iterated through it using the for each loop. That being said, the signature can be weaken to accept also the ? extends Iterable
. Could you please change it to
public <I extends Iterable<?>> SequenceWriter writeAll(I iterable) throws IOException {
for (Object value : iterable) {
write(value);
}
return this;
}
Collection extends Iterable, hence no API-breakage.
Metadata
Metadata
Assignees
Labels
No labels