Created
October 9, 2013 23:38
-
-
Save incepttechnologies/6910468 to your computer and use it in GitHub Desktop.
TableView : sort
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sort() { | |
//persons.sort((Person p1, Person p2) -> p1.id.compareTo(p2.id)); | |
Collections.sort(persons, new Comparator<Person>() { | |
@Override | |
public int compare(Person t, Person t1) { | |
System.out.println(" comparator called"); | |
return t.getId().compareTo(t1.getId()); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment