Interface Key

All Superinterfaces:
Comparable<Key>, net.kyori.examination.Examinable

public interface Key
extends Comparable<Key>, net.kyori.examination.Examinable
A key.
Since:
4.0.0
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static String MINECRAFT_NAMESPACE
    The namespace for Minecraft.
  • Method Summary

    Modifier and Type Method Description
    @NonNull String asString()
    Returns the string representation of this key.
    default int compareTo​(@NonNull Key that)  
    default @NonNull Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()  
    static @NonNull Key key​(@NonNull String string)
    Creates a key.
    static @NonNull Key key​(@NonNull String string, char character)
    Creates a key.
    static @NonNull Key key​(@NonNull String namespace, @NonNull String value)
    Creates a key.
    @NonNull String namespace()
    Gets the namespace.
    @NonNull String value()
    Gets the value.

    Methods inherited from interface net.kyori.examination.Examinable

    examinableName, examine
  • Field Details

  • Method Details

    • key

      static @NonNull Key key​(@NonNull String string)
      Creates a key.
      Parameters:
      string - the string
      Returns:
      the key
      Throws:
      InvalidKeyException - if the namespace or value contains an invalid character
      Since:
      4.0.0
    • key

      static @NonNull Key key​(@NonNull String string, char character)
      Creates a key.
      Parameters:
      string - the string
      character - the character
      Returns:
      the key
      Throws:
      InvalidKeyException - if the namespace or value contains an invalid character
      Since:
      4.0.0
    • key

      static @NonNull Key key​(@NonNull String namespace, @NonNull String value)
      Creates a key.
      Parameters:
      namespace - the namespace
      value - the value
      Returns:
      the key
      Throws:
      InvalidKeyException - if the namespace or value contains an invalid character
      Since:
      4.0.0
    • namespace

      @NonNull String namespace()
      Gets the namespace.
      Returns:
      the namespace
      Since:
      4.0.0
    • value

      @NonNull String value()
      Gets the value.
      Returns:
      the value
      Since:
      4.0.0
    • asString

      @NonNull String asString()
      Returns the string representation of this key.
      Returns:
      the string representation
      Since:
      4.0.0
    • examinableProperties

      default @NonNull Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
      Specified by:
      examinableProperties in interface net.kyori.examination.Examinable
    • compareTo

      default int compareTo​(@NonNull Key that)
      Specified by:
      compareTo in interface Comparable<Key>