Skip to content

Instantly share code, notes, and snippets.

@incepttechnologies
Created October 9, 2013 23:38
Show Gist options
  • Save incepttechnologies/6910468 to your computer and use it in GitHub Desktop.
Save incepttechnologies/6910468 to your computer and use it in GitHub Desktop.
TableView : sort
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