为了能够使用单参数版本
Collection.sort()上
ArrayList的
A,
A应该实现的
Comparable接口:
public class A implements Comparable<A> { ... @Override int compareTo(A rhs) { ... }}
为了能够使用单参数版本
Collection.sort()上
ArrayList的
A,
A应该实现的
Comparable接口:
public class A implements Comparable<A> { ... @Override int compareTo(A rhs) { ... }}