Record Class TaskPlan
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.autocrafting.task.TaskPlan
@API(status=STABLE,
since="2.0.0-milestone.4.12")
public record TaskPlan(ResourceKey resource, long amount, Pattern rootPattern, Map<Pattern,TaskPlan.PatternPlan> patterns, Collection<ResourceAmount> initialRequirements)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTaskPlan(ResourceKey resource, long amount, Pattern rootPattern, Map<Pattern, TaskPlan.PatternPlan> patterns, Collection<ResourceAmount> initialRequirements) Creates an instance of aTaskPlanrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.getPattern(Pattern pattern) final inthashCode()Returns a hash code value for this object.Returns the value of theinitialRequirementsrecord component.patterns()Returns the value of thepatternsrecord component.resource()Returns the value of theresourcerecord component.Returns the value of therootPatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskPlan
public TaskPlan(ResourceKey resource, long amount, Pattern rootPattern, Map<Pattern, TaskPlan.PatternPlan> patterns, Collection<ResourceAmount> initialRequirements) Creates an instance of aTaskPlanrecord class.- Parameters:
resource- the value for theresourcerecord componentamount- the value for theamountrecord componentrootPattern- the value for therootPatternrecord componentpatterns- the value for thepatternsrecord componentinitialRequirements- the value for theinitialRequirementsrecord component
-
-
Method Details
-
getPattern
-
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 '=='. -
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
-
rootPattern
Returns the value of therootPatternrecord component.- Returns:
- the value of the
rootPatternrecord component
-
patterns
Returns the value of thepatternsrecord component.- Returns:
- the value of the
patternsrecord component
-
initialRequirements
Returns the value of theinitialRequirementsrecord component.- Returns:
- the value of the
initialRequirementsrecord component
-