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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ProfileKeyPair>
private final PrivateKey
The field for theprivateKey
record component.private final ProfilePublicKey
The field for thepublicKey
record component.private final Instant
The field for therefreshedAfter
record component. -
Constructor Summary
ConstructorDescriptionProfileKeyPair
(PrivateKey privateKey, ProfilePublicKey publicKey, Instant refreshedAfter) Creates an instance of aProfileKeyPair
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theprivateKey
record component.Returns the value of thepublicKey
record component.Returns the value of therefreshedAfter
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
privateKey
The field for theprivateKey
record component. -
publicKey
The field for thepublicKey
record component. -
refreshedAfter
The field for therefreshedAfter
record component. -
CODEC
-
-
Constructor Details
-
ProfileKeyPair
Creates an instance of aProfileKeyPair
record class.- Parameters:
privateKey
- the value for theprivateKey
record componentpublicKey
- the value for thepublicKey
record componentrefreshedAfter
- the value for therefreshedAfter
record 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 theprivateKey
record component.- Returns:
- the value of the
privateKey
record component
-
publicKey
Returns the value of thepublicKey
record component.- Returns:
- the value of the
publicKey
record component
-
refreshedAfter
Returns the value of therefreshedAfter
record component.- Returns:
- the value of the
refreshedAfter
record component
-