Context Please
What's times1? What's times2? What's headSet()? What's headMap()?
[EDIT: Okay, I see. You are referring to the SortedSet and SortedMap interface]
Anyway, the interface (JavaDoc) states that the method should return a SortedSet and SortedMap respectively. There is nothing defined, that it must return a TreeSet for the SortedSet, and a TreeMap for the SortedMap -- although in the first case, it just happens to.
Henry