NatTable 中的值如何与 GlazedLists 进行比较?
How are values compared in NatTable with GlazedLists?
我确实将 NatTables 与 GlazedLists 一起使用。我在文档中找不到默认比较器如何比较值。根据ASCII码取值?
如果您没有为列配置任何其他 Comparator
,NatTable 将使用它的 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。
我确实将 NatTables 与 GlazedLists 一起使用。我在文档中找不到默认比较器如何比较值。根据ASCII码取值?
如果您没有为列配置任何其他 Comparator
,NatTable 将使用它的 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。