@Override
    public Comparator<ENTITY>
    thenComparingDouble(ToDoubleFunction<? super ENTITY> keyExtractor) {
        if (keyExtractor instanceof Getter) {
            @SuppressWarnings("unchecked")
            final Getter<ENTITY> getter = (Getter<ENTITY>) keyExtractor;
            final Optional<Comparator<ENTITY>> result = then(getter);
            if (result.isPresent()) {
                return result.get();
            }
        }

        return (a, b) -> {
            final int c = compare(a, b);
            if (c == 0) {
                final double oa = keyExtractor.applyAsDouble(a);
                final double ob = keyExtractor.applyAsDouble(b);
                return Double.compare(oa, ob);
            } else return c;
        };
    }
Default implementation of the {@link CombinedComparator}-interface.

@author Emil Forslund
@since  3.0.11
runtime-parent/runtime-field/src/main/java/com/speedment/runtime/field/internal/comparator/CombinedComparatorImpl.java