private static <K, V> @NotNull Index<K, V> create(final V[] values, final IntFunction<Map<V, K>> valueToKeyFactory, final @NotNull Function<? super V, ? extends K> keyFunction) {
    return create(Arrays.asList(values), valueToKeyFactory, keyFunction);
  }
Creates an index map.

@param keyFunction the key function
@param constants the constants
@param <K> the key type
@param <V> the value type
@return the key map
@since 4.0.0
api/src/main/java/net/kyori/adventure/util/Index.java