Interface RegistryKeySet<T extends Keyed>

All Superinterfaces:
Iterable<TypedKey<T>>, RegistrySet<T>
All Known Subinterfaces:
Tag<T>

@Experimental @NonExtendable public non-sealed interface RegistryKeySet<T extends Keyed> extends Iterable<TypedKey<T>>, RegistrySet<T>
  • Method Details

    • size

      default int size()
      Description copied from interface: RegistrySet
      Get the size of this set.
      Specified by:
      size in interface RegistrySet<T extends Keyed>
      Returns:
      the size
    • values

      @NonNull @Unmodifiable Collection<TypedKey<T>> values()
      Get the keys for the values in this set.
      Returns:
      the keys
    • resolve

      @NonNull @Unmodifiable Collection<T> resolve(@NonNull Registry<T> registry)
      Resolve this set into a collection of values. Prefer using values().
      Parameters:
      registry - the registry to resolve the values from (must match RegistrySet.registryKey())
      Returns:
      the resolved values
      See Also:
    • contains

      boolean contains(@NonNull TypedKey<T> valueKey)
      Checks if this set contains the value with the given key.
      Parameters:
      valueKey - the key to check
      Returns:
      true if the value is in this set
    • iterator

      default @NonNull Iterator<TypedKey<T>> iterator()
      Specified by:
      iterator in interface Iterable<T extends Keyed>