guava/src/com/google/common/collect/ImmutableBiMap.java
public static <T, K, V> Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap(
      Function<? super T, ? extends K> keyFunction,
      Function<? super T, ? extends V> valueFunction) {
    return CollectCollectors.toImmutableBiMap(keyFunction, valueFunction);
  }
public static <T, K, V> Collector<T, ?, ImmutableBiMap<K, V>> toImmutableBiMap(
      Function<? super T, ? extends K> keyFunction,
      Function<? super T, ? extends V> valueFunction) {
    return CollectCollectors.toImmutableBiMap(keyFunction, valueFunction);
  }
Returns a {@link Collector} that accumulates elements into an {@code ImmutableBiMap} whose keys
and values are the result of applying the provided mapping functions to the input elements.
Entries appear in the result {@code ImmutableBiMap} in encounter order.

<p>If the mapped keys or values contain duplicates (according to {@link Object#equals(Object)},
an {@code IllegalArgumentException} is thrown when the collection operation is performed. (This
differs from the {@code Collector} returned by {@link Collectors#toMap(Function, Function)},
which throws an {@code IllegalStateException}.)

@since 21.0