T - the metadata typepublic interface NodeMetadataKey<T>
It is intended that NodeMetadataKeys are obtained and stored as
follows.
public static final NodeMetadataKey<SpecialMetadata> SPECIAL_METADATA_KEY = NodeMetadataKey.of("specialmetadata", SpecialMetadata.class);
| Modifier and Type | Method and Description |
|---|---|
@NonNull String |
name()
Gets a name describing the key type.
|
static <T> @NonNull NodeMetadataKey<T> |
of(@NonNull String name,
@NonNull Class<T> type)
Creates a new
NodeMetadataKey for the given name and type. |
@NonNull Class<T> |
type()
Gets the type of the key
|
static <T> @NonNull NodeMetadataKey<T> of(@NonNull String name, @NonNull Class<T> type)
NodeMetadataKey for the given name and type.
Note that the returned key implements object reference equality.
T - the type parametername - the nametype - the type@NonNull String name()