public interface Metadatable
限定符和类型 | 方法和说明 |
---|---|
java.util.List<MetadataValue> |
getMetadata(java.lang.String metadataKey)
Returns a list of previously set metadata values from the implementing
object's metadata store.
|
boolean |
hasMetadata(java.lang.String metadataKey)
Tests to see whether the implementing object contains the given
metadata value in its metadata store.
|
void |
removeMetadata(java.lang.String metadataKey,
Plugin owningPlugin)
Removes the given metadata value from the implementing object's
metadata store.
|
void |
setMetadata(java.lang.String metadataKey,
MetadataValue newMetadataValue)
Sets a metadata value in the implementing object's metadata store.
|
void setMetadata(java.lang.String metadataKey, MetadataValue newMetadataValue)
metadataKey
- A unique key to identify this metadata.newMetadataValue
- The metadata value to apply.java.lang.IllegalArgumentException
- If value is null, or the owning plugin
is nulljava.util.List<MetadataValue> getMetadata(java.lang.String metadataKey)
metadataKey
- the unique metadata key being sought.boolean hasMetadata(java.lang.String metadataKey)
metadataKey
- the unique metadata key being queried.void removeMetadata(java.lang.String metadataKey, Plugin owningPlugin)
metadataKey
- the unique metadata key identifying the metadata to
remove.owningPlugin
- This plugin's metadata value will be removed. All
other values will be left untouched.java.lang.IllegalArgumentException
- If plugin is null