public final <K> ImmutableMap<K, E> uniqueIndex(Function<? super E, K> keyFunction) {
    return Maps.uniqueIndex(iterable, keyFunction);
  }
public final < K > ImmutableMap < K , E > uniqueIndex ( Function < ? super E , K > keyFunction ) { return Maps . uniqueIndex ( iterable , keyFunction ) ; }
Returns an immutable map for which the {@link java.util.Map#values} are the elements of this
{@code FluentIterable} in the given order, and each key is the product of invoking a supplied
function on its corresponding value.

@param keyFunction the function used to produce the key for each value
@throws IllegalArgumentException if {@code keyFunction} produces the same key for more than one
value in this fluent iterable
@throws NullPointerException if any element of this fluent iterable is null, or if
{@code keyFunction} produces {@code null} for any value
@since 14.0