Package de.mrjulsen.dragnsounds.api
Record Class ClientApi.UploadProgress
java.lang.Object
java.lang.Record
de.mrjulsen.dragnsounds.api.ClientApi.UploadProgress
- Enclosing class:
- ClientApi
public static record ClientApi.UploadProgress(double progress, ClientApi.UploadState state)
extends Record
-
Constructor Summary
ConstructorDescriptionUploadProgress
(double progress, ClientApi.UploadState state) Creates an instance of aUploadProgress
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static ClientApi.UploadProgress
fromNbt
(net.minecraft.nbt.CompoundTag nbt) final int
hashCode()
Returns a hash code value for this object.double
progress()
Returns the value of theprogress
record component.state()
Returns the value of thestate
record component.net.minecraft.nbt.CompoundTag
toNbt()
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
UploadProgress
Creates an instance of aUploadProgress
record class.- Parameters:
progress
- the value for theprogress
record componentstate
- the value for thestate
record component
-
-
Method Details
-
toNbt
public net.minecraft.nbt.CompoundTag toNbt() -
fromNbt
-
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 '=='. -
progress
public double progress()Returns the value of theprogress
record component.- Returns:
- the value of the
progress
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-