@Override public int compare(Site s1, Site s2) { String[] name; String lastName1; String lastName2; try { name = s1.getNameReserving().split(" "); lastName1 = name[name.length - 1]; } catch (Exception e) { lastName1 = s1.getNameReserving(); } try { name = s2.getNameReserving().split(" "); lastName2 = name[name.length - 1]; } catch (Exception e) { lastName2 = s2.getNameReserving(); } return lastName2.compareTo(lastName1); }
@Override public int compare(Site s1, Site s2) { return s2.getCheckIn().daysSince(s1.getCheckIn()); }
@Override public int compare(Site s1, Site s2) { return s2.compareTo(s1); }