I have a Generic Class with two type variables, which implements java.lang.Comparable.
public class DoubleKey implements Comparable
public class DoubleKey< K implements Comparable, J implements Comparable> implements Comparable> { public int compareTo(DoubleKey that){ int cmp = this.key1.compareTo(that.key1); if(cmp==0) cmp = this.key2.compareTo(that.key2); return cmp; } }