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 record
static final record
static 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 aTaskSnapshot
record class. -
Method Summary
Modifier and TypeMethodDescriptionactor()
Returns the value of theactor
record component.long
amount()
Returns the value of theamount
record component.boolean
Returns the value of thecancelled
record component.Returns the value of thecompletedPatterns
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theinitialRequirements
record component.Returns the value of theinternalStorage
record component.boolean
Returns the value of thenotifyActor
record component.patterns()
Returns the value of thepatterns
record component.resource()
Returns the value of theresource
record component.long
Returns the value of thestartTime
record component.state()
Returns the value of thestate
record component.final String
toString()
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 aTaskSnapshot
record class.- Parameters:
id
- the value for theid
record componentresource
- the value for theresource
record componentamount
- the value for theamount
record componentactor
- the value for theactor
record componentnotifyActor
- the value for thenotifyActor
record componentstartTime
- the value for thestartTime
record componentpatterns
- the value for thepatterns
record componentcompletedPatterns
- the value for thecompletedPatterns
record componentinitialRequirements
- the value for theinitialRequirements
record componentinternalStorage
- the value for theinternalStorage
record componentstate
- the value for thestate
record componentcancelled
- the value for thecancelled
record 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 theid
record component.- Returns:
- the value of the
id
record component
-
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
amount
public long amount()Returns the value of theamount
record component.- Returns:
- the value of the
amount
record component
-
actor
Returns the value of theactor
record component.- Returns:
- the value of the
actor
record component
-
notifyActor
public boolean notifyActor()Returns the value of thenotifyActor
record component.- Returns:
- the value of the
notifyActor
record component
-
startTime
public long startTime()Returns the value of thestartTime
record component.- Returns:
- the value of the
startTime
record component
-
patterns
Returns the value of thepatterns
record component.- Returns:
- the value of the
patterns
record component
-
completedPatterns
Returns the value of thecompletedPatterns
record component.- Returns:
- the value of the
completedPatterns
record component
-
initialRequirements
Returns the value of theinitialRequirements
record component.- Returns:
- the value of the
initialRequirements
record component
-
internalStorage
Returns the value of theinternalStorage
record component.- Returns:
- the value of the
internalStorage
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
cancelled
public boolean cancelled()Returns the value of thecancelled
record component.- Returns:
- the value of the
cancelled
record component
-