Record Class TaskStatus
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus
@API(status=STABLE,
since="2.0.0-milestone.4.10")
public record TaskStatus(TaskStatus.TaskInfo info, TaskState state, double percentageCompleted, List<TaskStatus.Item> items)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionTaskStatus(TaskStatus.TaskInfo info, TaskState state, double percentageCompleted, List<TaskStatus.Item> items) Creates an instance of aTaskStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.items()Returns the value of theitemsrecord component.doubleReturns the value of thepercentageCompletedrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskStatus
public TaskStatus(TaskStatus.TaskInfo info, TaskState state, double percentageCompleted, List<TaskStatus.Item> items) Creates an instance of aTaskStatusrecord class.- Parameters:
info- the value for theinforecord componentstate- the value for thestaterecord componentpercentageCompleted- the value for thepercentageCompletedrecord componentitems- the value for theitemsrecord component
-
-
Method Details
-
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 '=='. -
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
percentageCompleted
public double percentageCompleted()Returns the value of thepercentageCompletedrecord component.- Returns:
- the value of the
percentageCompletedrecord component
-
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-