Package net.minecraft.core
Record Class RegistrySetBuilder.RegistryContents<T>
java.lang.Object
java.lang.Record
net.minecraft.core.RegistrySetBuilder.RegistryContents<T>
- Enclosing class:
- RegistrySetBuilder
static record RegistrySetBuilder.RegistryContents<T>(RegistrySetBuilder.RegistryStub<T> stub, Map<ResourceKey<T>,RegistrySetBuilder.ValueAndHolder<T>> values)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RegistrySetBuilder.RegistryStub<T>
The field for thestub
record component.private final Map<ResourceKey<T>,
RegistrySetBuilder.ValueAndHolder<T>> The field for thevalues
record component. -
Constructor Summary
ConstructorDescriptionRegistryContents
(RegistrySetBuilder.RegistryStub<T> stub, Map<ResourceKey<T>, RegistrySetBuilder.ValueAndHolder<T>> values) Creates an instance of aRegistryContents
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.stub()
Returns the value of thestub
record component.final String
toString()
Returns a string representation of this record class.values()
Returns the value of thevalues
record component.
-
Field Details
-
stub
The field for thestub
record component. -
values
The field for thevalues
record component.
-
-
Constructor Details
-
RegistryContents
RegistryContents(RegistrySetBuilder.RegistryStub<T> stub, Map<ResourceKey<T>, RegistrySetBuilder.ValueAndHolder<T>> values) Creates an instance of aRegistryContents
record class.- Parameters:
stub
- the value for thestub
record componentvalues
- the value for thevalues
record component
-
-
Method Details
-
buildAsLookup
-
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)
. -
stub
Returns the value of thestub
record component.- Returns:
- the value of the
stub
record component
-
values
Returns the value of thevalues
record component.- Returns:
- the value of the
values
record component
-