程序包 org.bukkit.persistence

# 类 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.

- ## 嵌套类概要

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

- ## 构造器概要

  构造器
  构造器
  说明
  `BooleanPersistentDataType()`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull Boolean`
  `fromPrimitive(@NotNull Byte primitive, @NotNull PersistentDataAdapterContext context)`
  Creates a complex object based of the passed primitive value
  `@NotNull Class<Boolean>`
  `getComplexType()`
  Returns the complex object type the primitive value resembles.
  `@NotNull Class<Byte>`
  `getPrimitiveType()`
  Returns the primitive data type of this tag.
  `@NotNull Byte`
  `toPrimitive(@NotNull Boolean 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`

- ## 构造器详细资料

  - ### BooleanPersistentDataType

    public BooleanPersistentDataType()

- ## 方法详细资料

  - ### getPrimitiveType

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

  - ### getComplexType

    @NotNull public @NotNull Class<Boolean> 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 instance
      `context` - 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 value
      `context` - the context this operation is running in
    返回:
      the complex object instance