Record Class HolderSetWrapper<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.plugin.builtin.wrapper.HolderSetWrapper<T>
- All Implemented Interfaces:
Iterable<T>
-
Constructor Summary
ConstructorsConstructorDescriptionHolderSetWrapper(net.minecraft.core.Registry<T> registry, net.minecraft.core.HolderSet<T> holders) Creates an instance of aHolderSetWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(net.minecraft.resources.ResourceLocation id) booleancontainsValue(T value) final booleanIndicates whether some other object is "equal to" this one.Set<net.minecraft.resources.ResourceLocation> getKeys()getRandom(net.minecraft.util.RandomSource random) final inthashCode()Returns a hash code value for this object.net.minecraft.core.HolderSet<T> holders()Returns the value of theholdersrecord component.booleanisEmpty()iterator()net.minecraft.core.Registry<T> registry()Returns the value of theregistryrecord component.intsize()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
public boolean contains(net.minecraft.resources.ResourceLocation id) -
containsValue
-
getValues
-
getKeys
-
getRandom
-
getRandom
-
iterator
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
holders
Returns the value of theholdersrecord component.- Returns:
- the value of the
holdersrecord component
-