Interface KeyedValue<T>

Type Parameters:
T - the value type
All Superinterfaces:
Keyed

public interface KeyedValue<T> extends Keyed
A T value with an associated Key.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> @NotNull KeyedValue<T>
    keyedValue(@NotNull Key key, T value)
    Creates a link.
    static <T> @NotNull KeyedValue<T>
    of(@NotNull Key key, T value)
    Deprecated.
    for removal since 4.10.0, use keyedValue(Key, Object) instead.
    Gets the value.

    Methods inherited from interface net.kyori.adventure.key.Keyed

    key
  • Method Details

    • keyedValue

      @NotNull static <T> @NotNull KeyedValue<T> keyedValue(@NotNull @NotNull Key key, @NotNull T value)
      Creates a link.
      Type Parameters:
      T - the value type
      Parameters:
      key - the key
      value - the value
      Returns:
      the keyed
      Since:
      4.10.0
    • of

      @Deprecated @ScheduledForRemoval(inVersion="5.0.0") @NotNull static <T> @NotNull KeyedValue<T> of(@NotNull @NotNull Key key, @NotNull T value)
      Deprecated.
      for removal since 4.10.0, use keyedValue(Key, Object) instead.
      Creates a link.
      Type Parameters:
      T - the value type
      Parameters:
      key - the key
      value - the value
      Returns:
      the keyed
      Since:
      4.0.0
    • value

      @NotNull T value()
      Gets the value.
      Returns:
      the value
      Since:
      4.0.0