程序包 org.bukkit.persistence

# 类 PersistentDataType.PrimitivePersistentDataType<P>

java.lang.Object
org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType<P>

类型参数:
  `P` - the generic type of the primitive objects

所有已实现的接口:
  `PersistentDataType<P,P>`

封闭接口:
  PersistentDataType<P,C>

public static class PersistentDataType.PrimitivePersistentDataType<P> extends Object implements PersistentDataType<P,P>
A default implementation that simply exists to pass on the retrieved or inserted value to the next layer.

This implementation does not add any kind of logic, but is used to provide default implementations for the primitive types.

- ## 嵌套类概要

  ## 从接口继承的嵌套类/接口 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`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `P`
  `fromPrimitive(P primitive, @NotNull PersistentDataAdapterContext context)`
  Creates a complex object based of the passed primitive value
  `@NotNull Class<P>`
  `getComplexType()`
  Returns the complex object type the primitive value resembles.
  `@NotNull Class<P>`
  `getPrimitiveType()`
  Returns the primitive data type of this tag.
  `P`
  `toPrimitive(P complex, @NotNull PersistentDataAdapterContext context)`
  Returns the primitive data that resembles the complex object passed to this method.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 方法详细资料

  - ### getPrimitiveType

    @NotNull public @NotNull Class<P> getPrimitiveType()
    从接口复制的说明: `PersistentDataType`
    Returns the primitive data type of this tag.
    指定者:
      `getPrimitiveType` 在接口中 `PersistentDataType<P,P>`
    返回:
      the class

  - ### getComplexType

    @NotNull public @NotNull Class<P> getComplexType()
    从接口复制的说明: `PersistentDataType`
    Returns the complex object type the primitive value resembles.
    指定者:
      `getComplexType` 在接口中 `PersistentDataType<P,P>`
    返回:
      the class type

  - ### 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` - the complex object instance
      `context` - the context this operation is running in
    返回:
      the primitive value

  - ### 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` - the primitive value
      `context` - the context this operation is running in
    返回:
      the complex object instance