Record Class TaskSnapshot
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.autocrafting.task.TaskSnapshot
public record TaskSnapshot(TaskId id, ResourceKey resource, long amount, Actor actor, boolean notifyActor, long startTime, Map<Pattern,TaskSnapshot.PatternSnapshot> patterns, List<TaskSnapshot.PatternSnapshot> completedPatterns, ResourceList initialRequirements, ResourceList internalStorage, TaskState state, boolean cancelled)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionTaskSnapshot(TaskId id, ResourceKey resource, long amount, Actor actor, boolean notifyActor, long startTime, Map<Pattern, TaskSnapshot.PatternSnapshot> patterns, List<TaskSnapshot.PatternSnapshot> completedPatterns, ResourceList initialRequirements, ResourceList internalStorage, TaskState state, boolean cancelled) Creates an instance of aTaskSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactor()Returns the value of theactorrecord component.longamount()Returns the value of theamountrecord component.booleanReturns the value of thecancelledrecord component.Returns the value of thecompletedPatternsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinitialRequirementsrecord component.Returns the value of theinternalStoragerecord component.booleanReturns the value of thenotifyActorrecord component.patterns()Returns the value of thepatternsrecord component.resource()Returns the value of theresourcerecord component.longReturns the value of thestartTimerecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskSnapshot
public TaskSnapshot(TaskId id, ResourceKey resource, long amount, Actor actor, boolean notifyActor, long startTime, Map<Pattern, TaskSnapshot.PatternSnapshot> patterns, List<TaskSnapshot.PatternSnapshot> completedPatterns, ResourceList initialRequirements, ResourceList internalStorage, TaskState state, boolean cancelled) Creates an instance of aTaskSnapshotrecord class.- Parameters:
id- the value for theidrecord componentresource- the value for theresourcerecord componentamount- the value for theamountrecord componentactor- the value for theactorrecord componentnotifyActor- the value for thenotifyActorrecord componentstartTime- the value for thestartTimerecord componentpatterns- the value for thepatternsrecord componentcompletedPatterns- the value for thecompletedPatternsrecord componentinitialRequirements- the value for theinitialRequirementsrecord componentinternalStorage- the value for theinternalStoragerecord componentstate- the value for thestaterecord componentcancelled- the value for thecancelledrecord component
-
-
Method Details
-
copyInternalStorage
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
amount
public long amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
actor
Returns the value of theactorrecord component.- Returns:
- the value of the
actorrecord component
-
notifyActor
public boolean notifyActor()Returns the value of thenotifyActorrecord component.- Returns:
- the value of the
notifyActorrecord component
-
startTime
public long startTime()Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
patterns
Returns the value of thepatternsrecord component.- Returns:
- the value of the
patternsrecord component
-
completedPatterns
Returns the value of thecompletedPatternsrecord component.- Returns:
- the value of the
completedPatternsrecord component
-
initialRequirements
Returns the value of theinitialRequirementsrecord component.- Returns:
- the value of the
initialRequirementsrecord component
-
internalStorage
Returns the value of theinternalStoragerecord component.- Returns:
- the value of the
internalStoragerecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
cancelled
public boolean cancelled()Returns the value of thecancelledrecord component.- Returns:
- the value of the
cancelledrecord component
-