public static <K, V> Builder<K, V> orderedBy(Comparator<K> comparator) {
    return new Builder<>(comparator);
  }
public static <K, V> Builder<K, V> orderedBy(Comparator<K> comparator) {
    return new Builder<>(comparator);
  }
public static < K , V > Builder < K , V > orderedBy ( Comparator < K > comparator ) { return new Builder <> ( comparator ) ; }
Returns a builder that creates immutable sorted maps with an explicit comparator. If the
comparator has a more general type than the map's keys, such as creating a {@code
SortedMap<Integer, String>} with a {@code Comparator<Number>}, use the {@link Builder}
constructor instead.

@throws NullPointerException if {@code comparator} is null
Returns a builder that creates immutable sorted maps with an explicit comparator . If the comparator has a more general type than the map s keys such as creating a { @code SortedMap<Integer String > } with a { @code Comparator<Number > } use the { @link Builder } constructor instead .