class Whatever implements Comparable { // used by generic sort (or max) routines public int compareTo(Object o){....} }