类 PersistentDataType.PrimitivePersistentDataType<P>
java.lang.Object
org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType<P>
- 类型参数:
P- 原始对象的泛型类型
- 所有已实现的接口:
PersistentDataType<P,P>
- 封闭接口:
- PersistentDataType<P,
C>
public static class PersistentDataType.PrimitivePersistentDataType<P>
extends Object
implements PersistentDataType<P,P>
一个默认实现,仅用于将检索或插入的值传递到下一层。
此实现不添加任何逻辑,而是用于为原始类型提供默认实现。
-
嵌套类概要
从接口继承的嵌套类/接口 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(P primitive, @NotNull PersistentDataAdapterContext context) 基于传递的原始值创建复杂对象。返回原始值所代表的复杂对象类型。返回此标签的原始数据类型。toPrimitive(P complex, @NotNull PersistentDataAdapterContext context) 返回与此方法传递的复杂对象相似的原始数据。
-
方法详细资料
-
getPrimitiveType
从接口复制的说明:PersistentDataType返回此标签的原始数据类型。原文: Returns the primitive data type of this tag.
- 指定者:
getPrimitiveType在接口中PersistentDataType<P,P> - 返回:
- 类
-
getComplexType
从接口复制的说明:PersistentDataType返回原始值所代表的复杂对象类型。原文: Returns the complex object type the primitive value resembles.
- 指定者:
getComplexType在接口中PersistentDataType<P,P> - 返回:
- 类类型
-
toPrimitive
@NotNull public P toPrimitive(@NotNull P complex, @NotNull @NotNull PersistentDataAdapterContext context) 从接口复制的说明:PersistentDataType返回与此方法传递的复杂对象相似的原始数据。原文: Returns the primitive data that resembles the complex object passed to this method.
- 指定者:
toPrimitive在接口中PersistentDataType<P,P> - 参数:
complex- 复杂对象实例context- 此操作运行的上下文- 返回:
- 原始值
-
fromPrimitive
@NotNull public P fromPrimitive(@NotNull P primitive, @NotNull @NotNull PersistentDataAdapterContext context) 从接口复制的说明:PersistentDataType基于传递的原始值创建复杂对象。原文: Creates a complex object based of the passed primitive value
- 指定者:
fromPrimitive在接口中PersistentDataType<P,P> - 参数:
primitive- 原始值context- 此操作运行的上下文- 返回:
- 复杂对象实例
-