Record Class InviteCode
java.lang.Object
java.lang.Record
com.mojang.realmsclient.dto.InviteCode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thecoderecord component.private final booleanThe field for theenabledrecord component.The field for theexpirationDaterecord component.private static final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionInviteCode(String code, @Nullable Instant expirationDate, boolean enabled) Creates an instance of aInviteCoderecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationDaterecord component.final inthashCode()Returns a hash code value for this object.static @Nullable InviteCodeparse(JsonObject json) static @Nullable InviteCodefinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
code
The field for thecoderecord component. -
expirationDate
-
enabled
private final boolean enabledThe field for theenabledrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
InviteCode
Creates an instance of aInviteCoderecord class.- Parameters:
code- the value for thecoderecord componentexpirationDate- the value for theexpirationDaterecord componentenabled- the value for theenabledrecord component
-
-
Method Details
-
parse
-
parse
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
expirationDate
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-