public abstract class MetadataValueAdapter extends 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 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.
|
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 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 String asString()
MetadataValueasString インタフェース内 MetadataValueCopyright © 2016. All rights reserved.