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, wait
invalidate, value
protected final java.lang.ref.WeakReference<Plugin> owningPlugin
protected MetadataValueAdapter(Plugin owningPlugin)
public Plugin getOwningPlugin()
MetadataValue
Plugin
that created this metadata item.getOwningPlugin
在接口中 MetadataValue
public int asInt()
MetadataValue
asInt
在接口中 MetadataValue
public float asFloat()
MetadataValue
asFloat
在接口中 MetadataValue
public double asDouble()
MetadataValue
asDouble
在接口中 MetadataValue
public long asLong()
MetadataValue
asLong
在接口中 MetadataValue
public short asShort()
MetadataValue
asShort
在接口中 MetadataValue
public byte asByte()
MetadataValue
asByte
在接口中 MetadataValue
public boolean asBoolean()
MetadataValue
asBoolean
在接口中 MetadataValue
public java.lang.String asString()
MetadataValue
asString
在接口中 MetadataValue