程序包 org.bukkit

# 类 Registry.SimpleRegistry<T extends Enum<T> & Keyed>

java.lang.Object
org.bukkit.Registry.SimpleRegistry<T>

所有已实现的接口:
  `Iterable<T>`, `Registry<T>`

封闭接口:
  Registry<T extends Keyed>

public static final class Registry.SimpleRegistry<T extends Enum<T> & Keyed> extends Object implements Registry<T>

- ## 嵌套类概要

  ## 从接口继承的嵌套类/接口 org.bukkit.Registry

  `Registry.SimpleRegistry<T extends Enum<T> & Keyed>`

- ## 字段概要

  ### 从接口继承的字段 org.bukkit.Registry

  `ADVANCEMENT, ART, ATTRIBUTE, BANNER_PATTERN, BIOME, BLOCK, BOSS_BARS, CAT_VARIANT, DAMAGE_TYPE, EFFECT, ENCHANTMENT, ENTITY_TYPE, FLUID, FROG_VARIANT, GAME_EVENT, INSTRUMENT, ITEM, JUKEBOX_SONG, LOOT_TABLES, MAP_DECORATION_TYPE, MATERIAL, MEMORY_MODULE_TYPE, PARTICLE_TYPE, POTION, SOUNDS, STATISTIC, STRUCTURE, STRUCTURE_TYPE, TRIM_MATERIAL, TRIM_PATTERN, VILLAGER_PROFESSION, VILLAGER_TYPE, WOLF_VARIANT`

- ## 构造器概要

  构造器
  限定符
  构造器
  说明
  `protected`
  `SimpleRegistry(@NotNull Class<T> type)`
  `protected`
  `SimpleRegistry(@NotNull Class<T> type, @NotNull Predicate<T> predicate)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `T`
  `get(@NotNull NamespacedKey key)`
  Get the object by its key.
  `Class<T>`
  `getType()`
  已过时, 待删除: 此 API 元素将从以后的版本中删除。
  `@NotNull Iterator<T>`
  `iterator()`
  `@NotNull Stream<T>`
  `stream()`
  Returns a new stream, which contains all registry items, which are registered to the registry.

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

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

  ### 从接口继承的方法 java.lang.Iterable

  `forEach, spliterator`

  ### 从接口继承的方法 org.bukkit.Registry

  `match`

- ## 构造器详细资料

  - ### SimpleRegistry

    protected SimpleRegistry(@NotNull @NotNull Class<T> type)

  - ### SimpleRegistry

    protected SimpleRegistry(@NotNull @NotNull Class<T> type, @NotNull @NotNull Predicate<T> predicate)

- ## 方法详细资料

  - ### get

    @Nullable public T get(@NotNull @NotNull NamespacedKey key)
    从接口复制的说明: `Registry`
    Get the object by its key.
    指定者:
      `get` 在接口中 `Registry<T extends Enum<T> & Keyed>`
    参数:
      `key` - non-null key
    返回:
      item or null if does not exist

  - ### stream

    @NotNull public @NotNull Stream<T> stream()
    从接口复制的说明: `Registry`
    Returns a new stream, which contains all registry items, which are registered to the registry.
    指定者:
      `stream` 在接口中 `Registry<T extends Enum<T> & Keyed>`
    返回:
      a stream of all registry items

  - ### iterator

    @NotNull public @NotNull Iterator<T> iterator()
    指定者:
      `iterator` 在接口中 `Iterable<T extends Enum<T> & Keyed>`

  - ### getType

    @Internal @Deprecated(since="1.20.6", forRemoval=true) public Class<T> getType()
    已过时, 待删除: 此 API 元素将从以后的版本中删除。