You don't get warnings about List
and Map
because those interfaces do declare equals()
and hashCode()
methods.
Since SortedMap
extends the Map
interface which does have the methods and which should still work for SortedMap
I think everything should work.