How are values compared in NatTable with GlazedLists?

38 views Asked by At

I do use NatTables with GlazedLists. I can not find in documentation, how default comparator compares values. According ASCII code values?

1

There are 1 answers

1
Dirk Fauth On BEST ANSWER

If you have not configured any other Comparator for a column, NatTable will use its DefaultComparator. The DefaultComparator checks if both objects are of type Comparable, if so it will use the compareTo(String) method of that type. If not it will try to get the String representation of the object and perform a comparison based on that. String itself is also a Comparable so you find the detailed information how Strings are compared in the Javadoc.