void (Format format) { if (this.format != format) { this.format = format; // as bonus, override default Comparator for dates // if the instance is not a DateComparator, the user has set // its own comparator (perhaps has done it as well and it is // a DateComparator, but seems unlikely) if ((format != null) && (comparator instanceof DateComparator) && Date.class.isAssignableFrom(modelClass)) { setComparator(DateComparator.getDateComparator(format)); } else { formatOrComparatorUpdated(); } } }