Package com.mojang.realmsclient.client
Record Class RealmsError.ErrorWithJsonPayload
java.lang.Object
java.lang.Record
com.mojang.realmsclient.client.RealmsError.ErrorWithJsonPayload
- All Implemented Interfaces:
RealmsError
- Enclosing interface:
- RealmsError
public static record RealmsError.ErrorWithJsonPayload(int httpCode, int code, @Nullable String reason, @Nullable String message)
extends Record
implements RealmsError
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.realmsclient.client.RealmsError
RealmsError.AuthenticationError, RealmsError.CustomError, RealmsError.ErrorWithJsonPayload, RealmsError.ErrorWithRawPayload
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thecode
record component.private final int
The field for thehttpCode
record component.private final String
The field for themessage
record component.private final String
The field for thereason
record component.Fields inherited from interface com.mojang.realmsclient.client.RealmsError
LOGGER, NO_MESSAGE
-
Constructor Summary
ConstructorDescriptionErrorWithJsonPayload
(int httpCode, int code, String reason, String message) Creates an instance of aErrorWithJsonPayload
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
code()
Returns the value of thecode
record component.final boolean
Indicates whether some other object is "equal to" this one.int
final int
hashCode()
Returns a hash code value for this object.int
httpCode()
Returns the value of thehttpCode
record component.message()
Returns the value of themessage
record component.reason()
Returns the value of thereason
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
httpCode
private final int httpCodeThe field for thehttpCode
record component. -
code
private final int codeThe field for thecode
record component. -
reason
The field for thereason
record component. -
message
The field for themessage
record component.
-
-
Constructor Details
-
ErrorWithJsonPayload
public ErrorWithJsonPayload(int httpCode, int code, @Nullable String reason, @Nullable String message) Creates an instance of aErrorWithJsonPayload
record class.- Parameters:
httpCode
- the value for thehttpCode
record componentcode
- the value for thecode
record componentreason
- the value for thereason
record componentmessage
- the value for themessage
record component
-
-
Method Details
-
errorCode
public int errorCode()- Specified by:
errorCode
in interfaceRealmsError
-
errorMessage
- Specified by:
errorMessage
in interfaceRealmsError
-
logMessage
- Specified by:
logMessage
in interfaceRealmsError
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
httpCode
public int httpCode()Returns the value of thehttpCode
record component.- Returns:
- the value of the
httpCode
record component
-
code
public int code()Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-
reason
Returns the value of thereason
record component.- Returns:
- the value of the
reason
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-