Class MetaDataKey<T>

java.lang.Object
com.plotsquared.core.player.MetaDataKey<T>
Type Parameters:
T - Meta data type

public final class MetaDataKey<T> extends Object
Key used to access meta data
  • Method Details

    • of

      public static <T> @NonNull MetaDataKey<T> of(@NonNull String key, @NonNull com.google.inject.TypeLiteral<T> type)
      Get a new named lock key
      Type Parameters:
      T - Type
      Parameters:
      key - Key name
      type - type
      Returns:
      MetaData key instance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getLockKey

      public @NonNull LockKey getLockKey()
      Get the LockKey associated with this key
      Returns:
      Lock key
    • getType

      public @NonNull com.google.inject.TypeLiteral<T> getType()
      Get the meta data type
      Returns:
      Meta data type