private static void addTypePair(final Type type1,
                                    final Type type2,
                                    final Comparator<Val> comparator) {
        Objects.requireNonNull(type1);
        Objects.requireNonNull(type2);
        Objects.requireNonNull(comparator);
        final ValComparatorFactory comparatorFactory = SingleValComparatorFactory.create(comparator);
        doOrderedPut(type1, type2, comparatorFactory);
        // Now put the same but with the types reversed, so you can look up either way
        doOrderedPut(type2, type1, comparatorFactory);
    }
type1 and type2 can be in any order
stroom-query/stroom-query-language/src/main/java/stroom/query/language/functions/ValComparators.java