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
  • 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 a TaskSnapshot record class.
      Parameters:
      id - the value for the id record component
      resource - the value for the resource record component
      amount - the value for the amount record component
      actor - the value for the actor record component
      notifyActor - the value for the notifyActor record component
      startTime - the value for the startTime record component
      patterns - the value for the patterns record component
      completedPatterns - the value for the completedPatterns record component
      initialRequirements - the value for the initialRequirements record component
      internalStorage - the value for the internalStorage record component
      state - the value for the state record component
      cancelled - the value for the cancelled record component
  • Method Details

    • copyInternalStorage

      public MutableResourceList copyInternalStorage()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public TaskId id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • resource

      public ResourceKey resource()
      Returns the value of the resource record component.
      Returns:
      the value of the resource record component
    • amount

      public long amount()
      Returns the value of the amount record component.
      Returns:
      the value of the amount record component
    • actor

      public Actor actor()
      Returns the value of the actor record component.
      Returns:
      the value of the actor record component
    • notifyActor

      public boolean notifyActor()
      Returns the value of the notifyActor record component.
      Returns:
      the value of the notifyActor record component
    • startTime

      public long startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • patterns

      Returns the value of the patterns record component.
      Returns:
      the value of the patterns record component
    • completedPatterns

      public List<TaskSnapshot.PatternSnapshot> completedPatterns()
      Returns the value of the completedPatterns record component.
      Returns:
      the value of the completedPatterns record component
    • initialRequirements

      public ResourceList initialRequirements()
      Returns the value of the initialRequirements record component.
      Returns:
      the value of the initialRequirements record component
    • internalStorage

      public ResourceList internalStorage()
      Returns the value of the internalStorage record component.
      Returns:
      the value of the internalStorage record component
    • state

      public TaskState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • cancelled

      public boolean cancelled()
      Returns the value of the cancelled record component.
      Returns:
      the value of the cancelled record component