private static <T extends Comparable<T>> Tuple2<T, T> r(T t1, T t2) {
        if (t1 != null && t2 != null)
            return t1.compareTo(t2) <= 0 ? new Tuple2<>(t1, t2) : new Tuple2<>(t2, t1);
        else
            return new Tuple2<>(t1, t2);
    }
A range is a special {@link Tuple2} with two times the same type.
<p>
Ranges can be (partially) unbounded if one or both of their bounds are <code>null</code>,
which corresponds to "infinity", if <code>T</code> is a type that doesn't already have an
infinity value, such as {@link Double#POSITIVE_INFINITY} or {@link Double#NEGATIVE_INFINITY}.
<p>
Ranges are inclusive on both bounds.

@author Lukas Eder
jOOL-java-8/src/main/java/org/jooq/lambda/tuple/Range.java