关于IllegalArgumentException: Comparison method violates its general contract!
最近遇到了IllegalArgumentException: Comparison method violates its general contract! google了半天终于找到了解决办法,有以下三种:(1) 更改Comparator内部实现,确保排序的逻辑满足以下条件:a) sng(compare(x,y)) == -sgn(compare(y,x));b) 如果(comp
原创
2013-11-02 12:36:04 ·
5700 阅读 ·
1 评论