docs: public static <T> TypeFactory<T> with( final TypeFactory<T> original,
                                             final Order order,
                                             final NullOrder nullOrder ) {
          final Comparator<T> comparator = original.getComparator();
          final String toString = "Comparator<" + original.getTypeName() + ">(" + order + " " + nullOrder + ")";
          switch (order) {
              case ASCENDING:
                  switch (nullOrder) {
                      case NULLS_FIRST:
                          // Nulls must be first, so we can just check that before we delegate to the original comparator ...
                          Comparator<T> nullFirst = new SerializableComparator<T>() {
                              private static final long serialVersionUID = 1L;
  
                              @Override
                              public int compare( T o1,
                                                  T o2 ) {
                                  if (o1 == null) return -1;
                                  if (o2 == null) return 1;
                                  assert o1 != null;
                                  assert o2 != null;
                                  return comparator.compare(o1, o2); // order is same!
                              }
  
                              @Override
                              public String toString() {
                                  return toString;
                              }
                          };
                          return withComparator(original, nullFirst);
                      case NULLS_LAST:
                          // Otherwise, nulls must be last, so we can just check that before we delegate to the original comparator
                          // ...
                          Comparator<T> nullLast = new SerializableComparator<T>() {
                              private static final long serialVersionUID = 1L;
  
                              @Override
                              public int compare( T o1,
                                                  T o2 ) {
                                  if (o1 == null) return 1;
                                  if (o2 == null) return -1;
                                  assert o1 != null;
                                  assert o2 != null;
                                  return comparator.compare(o1, o2); // order is same!
                              }
  
                              @Override
                              public String toString() {
                                  return toString;
                              }
                          };
                          return withComparator(original, nullLast);
                  }
                  assert false;
                  break;
              case DESCENDING:
                  switch (nullOrder) {
                      case NULLS_FIRST:
                          // Otherwise, nulls must be last, so we can just check that before we delegate to the original comparator
                          // ...
                          Comparator<T> nullFirst = new SerializableComparator<T>() {
                              private static final long serialVersionUID = 1L;
  
                              @Override
                              public int compare( T o1,
                                                  T o2 ) {
                                  if (o1 == null) return -1;
                                  if (o2 == null) return 1;
                                  assert o1 != null;
                                  assert o2 != null;
                                  return comparator.compare(o2, o1); // order is different!
                              }
  
                              @Override
                              public String toString() {
                                  return toString;
                              }
                          };
                          return withComparator(original, nullFirst);
                      case NULLS_LAST:
                          // Otherwise, nulls must be last, so we can just check that before we delegate to the original comparator
                          // ...
                          Comparator<T> nullLast = new SerializableComparator<T>() {
                              private static final long serialVersionUID = 1L;
  
                              @Override
                              public int compare( T o1,
                                                  T o2 ) {
                                  if (o1 == null) return 1;
                                  if (o2 == null) return -1;
                                  assert o1 != null;
                                  assert o2 != null;
                                  return comparator.compare(o2, o1); // order is different!
                              }
  
                              @Override
                              public String toString() {
                                  return toString;
                              }
                          };
                          return withComparator(original, nullLast);
                  }
          }
          assert false;
          return null;
      }