Package org.geysermc.geyser.impl
Record Class IdentifierImpl
java.lang.Object
java.lang.Record
org.geysermc.geyser.impl.IdentifierImpl
- All Implemented Interfaces:
org.geysermc.geyser.api.util.Identifier
public record IdentifierImpl(net.kyori.adventure.key.Key identifier)
extends Record
implements org.geysermc.geyser.api.util.Identifier
-
Field Summary
Fields inherited from interface org.geysermc.geyser.api.util.Identifier
DEFAULT_NAMESPACE -
Constructor Summary
ConstructorsConstructorDescriptionIdentifierImpl(net.kyori.adventure.key.Key identifier) Creates an instance of aIdentifierImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.key.KeyReturns the value of theidentifierrecord component.static IdentifierImplstatic IdentifierImplpath()toString()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 org.geysermc.geyser.api.util.Identifier
vanilla
-
Constructor Details
-
IdentifierImpl
public IdentifierImpl(net.kyori.adventure.key.Key identifier) Creates an instance of aIdentifierImplrecord class.- Parameters:
identifier- the value for theidentifierrecord component
-
-
Method Details
-
of
- Throws:
IllegalArgumentException
-
of
-
namespace
- Specified by:
namespacein interfaceorg.geysermc.geyser.api.util.Identifier
-
path
- Specified by:
pathin interfaceorg.geysermc.geyser.api.util.Identifier
-
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). -
identifier
public net.kyori.adventure.key.Key identifier()Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-