@Override
public int compareTo(final myRow another) {
final int BEFORE =-1;
final int EQUAL = 0;
final int AFTER = 1;
Your ABC sort logic doesn't work. If you pass in two USER_TYPE_FRIEND
objects for instance, whatever their respective order, compareTo
will always return BEFORE
.
You need to implement this by first comparing the usertype.
If they are equal, you can return your row.compareTo(...)
expression.
If not, you need to return before/after depending only on how those types "compare" in your logic (i.e. friend < normal < banned).