private <T extends Comparable<T>> boolean isInsideRange(final DataRange other,
                                                            final Function<DataRange, T> fromFunc,
                                                            final Function<DataRange, T> toFunc) {
        final boolean result;
        if (other == null) {
            result = false;
        } else {
            final T thisFrom = fromFunc.apply(this);
            final T thisTo = toFunc.apply(this);
            if (thisFrom == null || thisTo == null) {
                result = false;
            } else {
                final T otherFrom = fromFunc.apply(other);
                final T otherTo = toFunc.apply(other);
                if (otherFrom == null || otherTo == null) {
                    result = false;
                } else {
                    result = thisFrom.compareTo(otherFrom) >= 0
                            && thisTo.compareTo(otherTo) <= 0;
                }
            }
        }
        return result;
    }
@return True if all of this range is inside or is identical to
the other range.
stroom-util-shared/src/main/java/stroom/util/shared/DataRange.java