Record Class MetadataMapping<T>
java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.metadata.MetadataMapping<T>
- All Implemented Interfaces:
MappingEntry<T>
public record MetadataMapping<T>(@NotNull String path, net.minestom.server.entity.MetadataDef.Entry<T> entry, @NotNull net.minestom.server.codec.Codec<T> codec)
extends Record
implements MappingEntry<T>
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataMapping(@NotNull String path, net.minestom.server.entity.MetadataDef.Entry<T> entry, @NotNull net.minestom.server.codec.Codec<T> codec) Creates an instance of aMetadataMappingrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minestom.server.codec.Codec<T> codec()Returns the value of thecodecrecord component.static <T> MetadataMapping<T> net.minestom.server.entity.MetadataDef.Entry<T> entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static <T> MetadataMapping<T> mapping(String path, net.minestom.server.entity.MetadataDef.Entry<T> entry, net.minestom.server.codec.Codec<T> codec) @NotNull Stringpath()Returns the value of thepathrecord component.static <T> MetadataMapping<net.minestom.server.registry.RegistryKey<T>> registry(String path, net.minestom.server.entity.MetadataDef.Entry<net.minestom.server.registry.RegistryKey<T>> entry, net.minestom.server.registry.Registries.Selector<T> selector) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MetadataMapping
public MetadataMapping(@NotNull @NotNull String path, @NotNull net.minestom.server.entity.MetadataDef.Entry<T> entry, @NotNull @NotNull net.minestom.server.codec.Codec<T> codec) Creates an instance of aMetadataMappingrecord class.- Parameters:
path- the value for thepathrecord componententry- the value for theentryrecord componentcodec- the value for thecodecrecord component
-
-
Method Details
-
registry
public static <T> MetadataMapping<net.minestom.server.registry.RegistryKey<T>> registry(String path, net.minestom.server.entity.MetadataDef.Entry<net.minestom.server.registry.RegistryKey<T>> entry, net.minestom.server.registry.Registries.Selector<T> selector) -
mapping
public static <T> MetadataMapping<T> mapping(String path, net.minestom.server.entity.MetadataDef.Entry<T> entry, net.minestom.server.codec.Codec<T> codec) -
direct
public static <T> MetadataMapping<T> direct(String path, net.minestom.server.entity.MetadataDef.Entry<T> entry) -
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). -
path
Returns the value of thepathrecord component.- Specified by:
pathin interfaceMappingEntry<T>- Returns:
- the value of the
pathrecord component
-
entry
Returns the value of theentryrecord component.- Specified by:
entryin interfaceMappingEntry<T>- Returns:
- the value of the
entryrecord component
-
codec
Returns the value of thecodecrecord component.- Specified by:
codecin interfaceMappingEntry<T>- Returns:
- the value of the
codecrecord component
-