Record Class UploadInfo
java.lang.Object
java.lang.Record
com.mojang.realmsclient.dto.UploadInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final Stringprivate static final org.slf4j.Loggerprivate final @Nullable StringThe field for thetokenrecord component.private final URIThe field for theuploadEndpointrecord component.private static final Patternprivate final booleanThe field for theworldClosedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUploadInfo(boolean worldClosed, @Nullable String token, URI uploadEndpoint) Creates an instance of aUploadInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable URIassembleUri(String endpoint, int portOverride) static StringcreateRequest(@Nullable String uploadToken) private static StringensureEndpointSchema(String endpoint, Matcher matcher) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static @Nullable UploadInfoprivate static intselectPortOrDefault(int portOverride, int parsedPort) @Nullable Stringtoken()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuploadEndpointrecord component.booleanReturns the value of theworldClosedrecord component.
-
Field Details
-
worldClosed
private final boolean worldClosedThe field for theworldClosedrecord component. -
token
The field for thetokenrecord component. -
uploadEndpoint
The field for theuploadEndpointrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
DEFAULT_SCHEMA
- See Also:
-
DEFAULT_PORT
private static final int DEFAULT_PORT- See Also:
-
URI_SCHEMA_PATTERN
-
-
Constructor Details
-
UploadInfo
Creates an instance of aUploadInforecord class.- Parameters:
worldClosed- the value for theworldClosedrecord componenttoken- the value for thetokenrecord componentuploadEndpoint- the value for theuploadEndpointrecord component
-
-
Method Details
-
parse
-
assembleUri
-
selectPortOrDefault
private static int selectPortOrDefault(int portOverride, int parsedPort) -
ensureEndpointSchema
-
createRequest
-
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. -
worldClosed
public boolean worldClosed()Returns the value of theworldClosedrecord component.- Returns:
- the value of the
worldClosedrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
uploadEndpoint
Returns the value of theuploadEndpointrecord component.- Returns:
- the value of the
uploadEndpointrecord component
-