Package io.papermc.paper.registry.set
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 Summary
Modifier and TypeMethodDescriptionboolean
Checks if this set contains the value with the given key.iterator()
@NonNull @Unmodifiable Collection
<T> Resolve this set into a collection of values.default int
size()
Get the size of this set.@NonNull @Unmodifiable Collection
<TypedKey<T>> values()
Get the keys for the values in this set.Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.papermc.paper.registry.set.RegistrySet
isEmpty, registryKey
-
Method Details
-
size
default int size()Description copied from interface:RegistrySet
Get the size of this set.- Specified by:
size
in interfaceRegistrySet<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
Resolve this set into a collection of values. Prefer usingvalues()
.- Parameters:
registry
- the registry to resolve the values from (must matchRegistrySet.registryKey()
)- Returns:
- the resolved values
- See Also:
-
contains
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
-