use of com.google.security.zynamics.zylib.general.comparators.LexicalComparator in project binnavi by google.
the class CTableSorter method getComparator.
@SuppressWarnings({ "unchecked", "rawtypes" })
protected Comparator<Object> getComparator(final int column) {
final Class columnType = tableModel.getColumnClass(column);
Comparator<Object> comparator = primaryColumnComparator.get(column);
if (comparator != null) {
return comparator;
}
comparator = columnComparators.get(columnType);
if (comparator != null) {
return comparator;
}
if (columnType.equals(String.class)) {
return (Comparator) new LexicalComparator();
}
if (Comparable.class.isAssignableFrom(columnType)) {
return COMPARABLE_COMPARATOR;
}
return (Comparator) new LexicalComparator();
}
Aggregations