Record Class TaskSnapshot.PatternSnapshot
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.autocrafting.task.TaskSnapshot.PatternSnapshot
- Enclosing class:
TaskSnapshot
public static record TaskSnapshot.PatternSnapshot(boolean root, Pattern pattern, Map<Integer,Map<ResourceKey,Long>> ingredients, @Nullable TaskSnapshot.InternalPatternSnapshot internalPattern, @Nullable TaskSnapshot.ExternalPatternSnapshot externalPattern)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPatternSnapshot
(boolean root, Pattern pattern, Map<Integer, Map<ResourceKey, Long>> ingredients, TaskSnapshot.InternalPatternSnapshot internalPattern, TaskSnapshot.ExternalPatternSnapshot externalPattern) Creates an instance of aPatternSnapshot
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexternalPattern
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theingredients
record component.Returns the value of theinternalPattern
record component.pattern()
Returns the value of thepattern
record component.boolean
root()
Returns the value of theroot
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PatternSnapshot
public PatternSnapshot(boolean root, Pattern pattern, Map<Integer, Map<ResourceKey, Long>> ingredients, @Nullable TaskSnapshot.InternalPatternSnapshot internalPattern, @Nullable TaskSnapshot.ExternalPatternSnapshot externalPattern) Creates an instance of aPatternSnapshot
record class.- Parameters:
root
- the value for theroot
record componentpattern
- the value for thepattern
record componentingredients
- the value for theingredients
record componentinternalPattern
- the value for theinternalPattern
record componentexternalPattern
- the value for theexternalPattern
record 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 '=='. -
root
public boolean root()Returns the value of theroot
record component.- Returns:
- the value of the
root
record component
-
pattern
Returns the value of thepattern
record component.- Returns:
- the value of the
pattern
record component
-
ingredients
Returns the value of theingredients
record component.- Returns:
- the value of the
ingredients
record component
-
internalPattern
Returns the value of theinternalPattern
record component.- Returns:
- the value of the
internalPattern
record component
-
externalPattern
Returns the value of theexternalPattern
record component.- Returns:
- the value of the
externalPattern
record component
-