According to Collections definition, methods like max
and min
have the following signature:
static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll)
I was wondering why that extends Object
would be necessary, as only T
is supposed to mean "any type" anyway. As an example, for the sort
method definition, from the same documentation, we have only <T extends Comparable<? super T>>
as expected.
Is there any reason for that extends Object
in max
and min
specifications?