code: public static <K, E, V> Collector<E, Map<K, V>, ImmutableMap<K, V>> uniqueIndex(Function<? super E, K> keyFunction,
      Function<? super E, V> valueFunction) {
      return uniqueIndex(keyFunction, valueFunction, DEFAULT_HASHMAP_CAPACITY);
    }
docs: Creates an {@link ImmutableMap} from the stream where the values are the result of {@link Function valueFunction}
  applied to the values in the stream and the keys are the result of the provided {@link Function keyFunction}
  applied to each value in the stream.
  
  <p>
  The {@link Function keyFunction} must return a unique (according to the key's type {@link Object#equals(Object)}
  and/or {@link Comparable#compareTo(Object)} implementations) value for each of them, otherwise a
  {@link IllegalArgumentException} will be thrown.
  </p>
  
  <p>
  Neither {@link Function keyFunction} nor {@link Function valueFunction} can return {@code null}, otherwise a
  {@link NullPointerException} will be thrown.
  </p>
  
  @throws NullPointerException if {@code keyFunction} or {@code valueFunction} is {@code null}.
  @throws NullPointerException if result of {@code keyFunction} or {@code valueFunction} is {@code null}.
  @throws IllegalArgumentException if {@code keyFunction} returns the same value for multiple entries in the stream.