Why doesn Iterator extend Enumeration?
We view the method names for Enumeration as unfortunate. They’re very long, and very frequently used. Given that we were adding a method and creating a whole new framework, we felt that it would be foolish not to take advantage of the opportunity to improve the names. Of course we could support the new and old names in Iterator, but it doesn’t seem worthwhile. • Why don’t you provide an Iterator.peek method that allows you to look at the next element in an iteration without advancing the iterator? It can be implemented atop the current Iterators (a similar pattern to java.io.PushbackInputStream). We believe that its use would be rare enough that it isn’t worth including in the interface that everyone has to implement.