接口 MetadataValue
public interface MetadataValue
-
方法概要
修饰符和类型方法说明boolean尝试将此元数据项的值转换为boolean.byteasByte()尝试将此元数据项的值转换为byte.doubleasDouble()尝试将此元数据项的值转换为double.floatasFloat()尝试将此元数据项的值转换为float.intasInt()尝试将此元数据项的值转换为int.longasLong()尝试将此元数据项的值转换为long.shortasShort()尝试将此元数据项的值转换为short.asString()尝试将此元数据项的值转换为字符串.返回创建此元数据项的Plugin.void使此元数据项无效, 强制其在下次访问时重新计算.value()获取此元数据项的值.
-
方法详细资料
-
value
获取此元数据项的值.原文: Fetches the value of this metadata item.
- 返回:
- 元数据值.
-
asInt
int asInt()尝试将此元数据项的值转换为int.原文: Attempts to convert the value of this metadata item into an int.
- 返回:
- int类型的值.
-
asFloat
float asFloat()尝试将此元数据项的值转换为float.原文: Attempts to convert the value of this metadata item into a float.
- 返回:
- float类型的值.
-
asDouble
double asDouble()尝试将此元数据项的值转换为double.原文: Attempts to convert the value of this metadata item into a double.
- 返回:
- double类型的值.
-
asLong
long asLong()尝试将此元数据项的值转换为long.原文: Attempts to convert the value of this metadata item into a long.
- 返回:
- long类型的值.
-
asShort
short asShort()尝试将此元数据项的值转换为short.原文: Attempts to convert the value of this metadata item into a short.
- 返回:
- short类型的值.
-
asByte
byte asByte()尝试将此元数据项的值转换为byte.原文: Attempts to convert the value of this metadata item into a byte.
- 返回:
- byte类型的值.
-
asBoolean
boolean asBoolean()尝试将此元数据项的值转换为boolean.原文: Attempts to convert the value of this metadata item into a boolean.
- 返回:
- boolean类型的值.
-
asString
尝试将此元数据项的值转换为字符串.原文: Attempts to convert the value of this metadata item into a string.
- 返回:
- 字符串类型的值.
-
getOwningPlugin
- 返回:
- 拥有此元数据值的插件. 如果插件已被卸载则可能为null.
-
invalidate
void invalidate()使此元数据项无效, 强制其在下次访问时重新计算.原文: Invalidates this metadata item, forcing it to recompute when next accessed.
-