public abstract class MetadataValueAdapter extends java.lang.Object implements MetadataValue
This provides all the conversion functions for MetadataValue so that writing an implementation of MetadataValue is as simple as implementing value() and invalidate().
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.lang.ref.WeakReference<Plugin> |
owningPlugin |
| 限定符 | 构造器和说明 |
|---|---|
protected |
MetadataValueAdapter(Plugin owningPlugin) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
asBoolean()
Attempts to convert the value of this metadata item into a boolean.
|
byte |
asByte()
Attempts to convert the value of this metadata item into a byte.
|
double |
asDouble()
Attempts to convert the value of this metadata item into a double.
|
float |
asFloat()
Attempts to convert the value of this metadata item into a float.
|
int |
asInt()
Attempts to convert the value of this metadata item into an int.
|
long |
asLong()
Attempts to convert the value of this metadata item into a long.
|
short |
asShort()
Attempts to convert the value of this metadata item into a short.
|
java.lang.String |
asString()
Attempts to convert the value of this metadata item into a string.
|
Plugin |
getOwningPlugin()
Returns the
Plugin that created this metadata item. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvalidate, valueprotected final java.lang.ref.WeakReference<Plugin> owningPlugin
protected MetadataValueAdapter(Plugin owningPlugin)
public Plugin getOwningPlugin()
MetadataValuePlugin that created this metadata item.getOwningPlugin 在接口中 MetadataValuepublic int asInt()
MetadataValueasInt 在接口中 MetadataValuepublic float asFloat()
MetadataValueasFloat 在接口中 MetadataValuepublic double asDouble()
MetadataValueasDouble 在接口中 MetadataValuepublic long asLong()
MetadataValueasLong 在接口中 MetadataValuepublic short asShort()
MetadataValueasShort 在接口中 MetadataValuepublic byte asByte()
MetadataValueasByte 在接口中 MetadataValuepublic boolean asBoolean()
MetadataValueasBoolean 在接口中 MetadataValuepublic java.lang.String asString()
MetadataValueasString 在接口中 MetadataValue