public int compareTo(UserInfo that) { long rhs = that.ordinal(); long lhs = this.ordinal(); if (rhs > lhs) return 1; if (rhs < lhs) return -1; return 0; }