de.caff.generics.function

## Interface Ordering.Serial<E>

- All Superinterfaces:
    Ordering<E>, java.io.Serializable
  Enclosing interface:
    Ordering<T>

      public static interface Ordering.Serial<E>
      extends Ordering<E>, java.io.Serializable

  An ordering which is serializable. It is a recommendation that comparators implement `java.io.Serializable` to allow serializing `TreeMap`s and similar. If an Ordering is expected to be used as a comparator in such areas implement either this interface, or for lambdas use a cast to force the compiler to make the order serializable:

         return (Ordering<T> & Serializable) (v1, v2) -> v1.compareTo(v2);

  You can also use a `(Ordering.Serial)` cast to save a bit of typing, but the above is a nice trick to have in your toolbox.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface de.caff.generics.function.Ordering

      `Ordering.Serial<E>`

  - ### Method Summary

    - ### Methods inherited from interface de.caff.generics.function.Ordering

      `andIfSame, andIfSame, andIfSame, ascending, ascendingOrSame, asComparator, asEqualityChecker, check, descending, descendingOrSame, different, fromComparator, inverse, inverseNatural, natural, nullsFirst, nullsLast, ordering, ordering, orderingDouble, orderingDouble, same`