@Override public void setComparator(Class<?> cl, Comparator cmp) {
        if (cl == String.class) {
            // do not allow a null comparator for Strings.
            // in addition, retrieve the proper case flag from the comparator
            if (cmp == null) {
                cmp = getStringComparator(ignoreCase);
            } else {
                setIgnoreCase(cmp.compare("a", "A") == 0);
            }
        } else if (cmp == null) {
            cmp = getComparator(cl);
        }

        if (cmp != comparators.put(cl, cmp)) {
            propertiesHandler.firePropertyChange(COMPARATOR_PROPERTY, null, cl);
        }
    }
@Override public void setComparator(Class<?> cl, Comparator cmp)