类 PersistentDataType.BooleanPersistentDataType
java.lang.Object
org.bukkit.persistence.PersistentDataType.BooleanPersistentDataType
- 所有已实现的接口:
PersistentDataType<Byte,
Boolean>
- 封闭接口:
- PersistentDataType<P,
C>
public static class PersistentDataType.BooleanPersistentDataType
extends Object
implements PersistentDataType<Byte,Boolean>
A convenience implementation to convert between Byte and Boolean as there is
no native implementation for booleans.
Any byte value not equal to 0 is considered to be true.
Any byte value not equal to 0 is considered to be true.
-
嵌套类概要
从接口继承的嵌套类/接口 org.bukkit.persistence.PersistentDataType
PersistentDataType.BooleanPersistentDataType, PersistentDataType.PrimitivePersistentDataType<P>
-
字段概要
从接口继承的字段 org.bukkit.persistence.PersistentDataType
BOOLEAN, BYTE, BYTE_ARRAY, DOUBLE, FLOAT, INTEGER, INTEGER_ARRAY, LIST, LONG, LONG_ARRAY, SHORT, STRING, TAG_CONTAINER, TAG_CONTAINER_ARRAY
-
构造器概要
-
方法概要
修饰符和类型方法说明fromPrimitive
(@NotNull Byte primitive, @NotNull PersistentDataAdapterContext context) Creates a complex object based of the passed primitive valueReturns the complex object type the primitive value resembles.Returns the primitive data type of this tag.toPrimitive
(@NotNull Boolean complex, @NotNull PersistentDataAdapterContext context) Returns the primitive data that resembles the complex object passed to this method.
-
构造器详细资料
-
BooleanPersistentDataType
public BooleanPersistentDataType()
-
-
方法详细资料
-
getPrimitiveType
从接口复制的说明:PersistentDataType
Returns the primitive data type of this tag.- 指定者:
getPrimitiveType
在接口中PersistentDataType<Byte,
Boolean> - 返回:
- the class
-
getComplexType
从接口复制的说明:PersistentDataType
Returns the complex object type the primitive value resembles.- 指定者:
getComplexType
在接口中PersistentDataType<Byte,
Boolean> - 返回:
- the class type
-
toPrimitive
@NotNull public @NotNull Byte toPrimitive(@NotNull @NotNull Boolean complex, @NotNull @NotNull PersistentDataAdapterContext context) 从接口复制的说明:PersistentDataType
Returns the primitive data that resembles the complex object passed to this method.- 指定者:
toPrimitive
在接口中PersistentDataType<Byte,
Boolean> - 参数:
complex
- the complex object instancecontext
- the context this operation is running in- 返回:
- the primitive value
-
fromPrimitive
@NotNull public @NotNull Boolean fromPrimitive(@NotNull @NotNull Byte primitive, @NotNull @NotNull PersistentDataAdapterContext context) 从接口复制的说明:PersistentDataType
Creates a complex object based of the passed primitive value- 指定者:
fromPrimitive
在接口中PersistentDataType<Byte,
Boolean> - 参数:
primitive
- the primitive valuecontext
- the context this operation is running in- 返回:
- the complex object instance
-