public <E extends Enum<E>> Builder<T> addEnumComparator(final String fieldId,
                                                                    final Function<T, E> extractor,
                                                                    final Function<E, String> toStringFunc) {
                Objects.requireNonNull(fieldId);
                Objects.requireNonNull(extractor);
                comparatorMap.put(
                        fieldId,
                        new CaseAgnosticComparator<>(CompareUtil.getNullSafeComparator(val -> {
                            final E anEnum = extractor.apply(val);
                            return toStringFunc.apply(anEnum);
                        })));
                return this;
            }
Adds a null-safe comparator for fieldId, using extractor and toString on the enum returned from
extractor.
stroom-util-shared/src/main/java/stroom/util/shared/CompareUtil.java