Package org.bukkit.entity.memory
Class MemoryKey<T>
- java.lang.Object
-
- org.bukkit.entity.memory.MemoryKey<T>
-
- Type Parameters:
T
- the class type of the memory value
- All Implemented Interfaces:
Keyed
public final class MemoryKey<T> extends Object implements Keyed
Represents a key used for accessing memory values of aLivingEntity
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemoryKey
getByKey(NamespacedKey namespacedKey)
Returns aMemoryKey
by aNamespacedKey
.NamespacedKey
getKey()
Return the namespaced identifier for this object.Class<T>
getMemoryClass()
Gets the class of values associated with this memory.static Set<MemoryKey>
values()
Returns the set of all MemoryKeys.
-
-
-
Method Detail
-
getKey
@NotNull public NamespacedKey getKey()
Description copied from interface:Keyed
Return the namespaced identifier for this object.
-
getMemoryClass
@NotNull public Class<T> getMemoryClass()
Gets the class of values associated with this memory.- Returns:
- the class of value objects
-
getByKey
@Nullable public static MemoryKey getByKey(@NotNull NamespacedKey namespacedKey)
Returns aMemoryKey
by aNamespacedKey
.- Parameters:
namespacedKey
- theNamespacedKey
referencing aMemoryKey
- Returns:
- the
MemoryKey
or null when noMemoryKey
is available under that key
-
-