Record Class CustomRegistryCollector.Entry<B extends io.netty.buffer.ByteBuf, T>
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.registry.CustomRegistryCollector.Entry<B,T>
- Enclosing interface:
CustomRegistryCollector
public static record CustomRegistryCollector.Entry<B extends io.netty.buffer.ByteBuf, T>(CustomRegistry<B extends io.netty.buffer.ByteBuf, T> registry, @Nullable Consumer<CustomRegistryTypeCollector<B extends io.netty.buffer.ByteBuf, T>> callback)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionEntry(CustomRegistry<B, T> registry, @Nullable Consumer<CustomRegistryTypeCollector<B, T>> callback) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Consumer<CustomRegistryTypeCollector<B, T>> callback()Returns the value of thecallbackrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
public Entry(CustomRegistry<B, T> registry, @Nullable @Nullable Consumer<CustomRegistryTypeCollector<B, T>> callback) Creates an instance of aEntryrecord class.- Parameters:
registry- the value for theregistryrecord componentcallback- the value for thecallbackrecord component
-
-
Method Details
-
toString
-
hashCode
-
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
-
callback
Returns the value of thecallbackrecord component.- Returns:
- the value of the
callbackrecord component
-