android/guava/src/com/google/common/collect/Ordering.java
@GwtCompatible(serializable = true)
  public static <T> Ordering<T> compound(Iterable<? extends Comparator<? super T>> comparators) {
    return new CompoundOrdering<T>(comparators);
  }
@GwtCompatible(serializable = true)
  public static <T> Ordering<T> compound(Iterable<? extends Comparator<? super T>> comparators) {
    return new CompoundOrdering<T>(comparators);
  }
Returns an ordering which tries each given comparator in order until a non-zero result is
found, returning that result, and returning zero only if all comparators return zero. The
returned ordering is based on the state of the {@code comparators} iterable at the time it was
provided to this method.

<p>The returned ordering is equivalent to that produced using {@code
Ordering.from(comp1).compound(comp2).compound(comp3) . . .}.

<p><b>Warning:</b> Supplying an argument with undefined iteration order, such as a {@link
HashSet}, will produce non-deterministic results.

<p><b>Java 8 users:</b> Use a chain of calls to {@link Comparator#thenComparing(Comparator)},
or {@code comparatorCollection.stream().reduce(Comparator::thenComparing).get()} (if the
collection might be empty, also provide a default comparator as the {@code identity} parameter
to {@code reduce}).

@param comparators the comparators to try in order