Package com.mojang.realmsclient.client
Record Class RealmsError.ErrorWithRawPayload
java.lang.Object
java.lang.Record
com.mojang.realmsclient.client.RealmsError.ErrorWithRawPayload
- All Implemented Interfaces:
RealmsError
- Enclosing interface:
- RealmsError
public static record RealmsError.ErrorWithRawPayload(int httpCode, String payload)
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 thehttpCode
record component.private final String
The field for thepayload
record component.Fields inherited from interface com.mojang.realmsclient.client.RealmsError
LOGGER, NO_MESSAGE
-
Constructor Summary
ConstructorDescriptionErrorWithRawPayload
(int httpCode, String payload) Creates an instance of aErrorWithRawPayload
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.payload()
Returns the value of thepayload
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. -
payload
The field for thepayload
record component.
-
-
Constructor Details
-
ErrorWithRawPayload
Creates an instance of aErrorWithRawPayload
record class.- Parameters:
httpCode
- the value for thehttpCode
record componentpayload
- the value for thepayload
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
-
payload
Returns the value of thepayload
record component.- Returns:
- the value of the
payload
record component
-