It does nothing. This is personal, so you cannot import it.
This is really a comment that the type is "SelfComparable" and is not actually used.
Nothing implements this interface. The code that uses it relies on it to be discarded at runtime.
public static <T> T max(Collection<? extends T> coll, Comparator<? super T> comp) { if (comp==null) return (T)max((Collection<SelfComparable>) (Collection) coll);
could have been
public static <T> T max(Collection<? extends T> coll, Comparator<? super T> comp) { if (comp==null) return (T)max( (Collection) coll);
as it will be ignored at runtime.
source share