Why is there the method iterator() defined on the interface java.util.Collection when it already extends java.util.Iterable which has this very method defined.
I’m thinking some sort of backward compatability or an opportunity to write some JavaDoc on the method at the collection level.
Any other ideas?
I have been doing some more investigation on this and have found that the equals() and hashcode() methods are also overwritten.
Clearly the only reason for this can be to add the javadoc – maybe this is why iterator() was also overwritten.