Record Class ProfileKeyPair
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.ProfileKeyPair
public record ProfileKeyPair(PrivateKey privateKey, ProfilePublicKey publicKey, Instant refreshedAfter)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ProfileKeyPair> private final PrivateKeyThe field for theprivateKeyrecord component.private final ProfilePublicKeyThe field for thepublicKeyrecord component.private final InstantThe field for therefreshedAfterrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionProfileKeyPair(PrivateKey privateKey, ProfilePublicKey publicKey, Instant refreshedAfter) Creates an instance of aProfileKeyPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theprivateKeyrecord component.Returns the value of thepublicKeyrecord component.Returns the value of therefreshedAfterrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
privateKey
The field for theprivateKeyrecord component. -
publicKey
The field for thepublicKeyrecord component. -
refreshedAfter
The field for therefreshedAfterrecord component. -
CODEC
-
-
Constructor Details
-
ProfileKeyPair
Creates an instance of aProfileKeyPairrecord class.- Parameters:
privateKey- the value for theprivateKeyrecord componentpublicKey- the value for thepublicKeyrecord componentrefreshedAfter- the value for therefreshedAfterrecord component
-
-
Method Details
-
dueRefresh
public boolean dueRefresh() -
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). -
privateKey
Returns the value of theprivateKeyrecord component.- Returns:
- the value of the
privateKeyrecord component
-
publicKey
Returns the value of thepublicKeyrecord component.- Returns:
- the value of the
publicKeyrecord component
-
refreshedAfter
Returns the value of therefreshedAfterrecord component.- Returns:
- the value of the
refreshedAfterrecord component
-