public @Nullable V value(final @NotNull K key) {
    return this.keyToValue.get(key);
  }
Gets a value by its key.

@param key the key
@return the value
@since 4.0.0
api/src/main/java/net/kyori/adventure/util/Index.java