Reputation: 2459
In the source code of Collection<E>
, I am wondering why the @Override
annotation is used. The spliterator()
method doesn't come from Iterable<E>
, and Object
doesn't have it either.
public interface Collection<E> extends Iterable<E> {
@Override
default java.util.Spliterator<E> spliterator() {
return java.util.Spliterators.spliterator(this, 0);
}
Upvotes: 0
Views: 136
Reputation: 8552
Iterable DOES HAVE spliterator. Check javadoc for java8 not the previous ones
Upvotes: 2