Record Class RecipePreviewContext
java.lang.Object
java.lang.Record
ke.ric.cooking.data.RecipePreviewContext
Declared catalog choices, independent of decorative ItemStacks and gameplay credentials.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRecipePreviewContext(List<RecipePreviewContext.Selection> selections) Creates an instance of aRecipePreviewContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongcountMatching(IngredientSlot slot) Count every matching declared unit, regardless of which recipe slot selected it.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(RuleMatcher matcher) Identity rules use declared selections, including refinements absent from sanitized icons.Returns the value of theselectionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
RecipePreviewContext
Creates an instance of aRecipePreviewContextrecord class.- Parameters:
selections- the value for theselectionsrecord component
-
-
Method Details
-
countMatching
Count every matching declared unit, regardless of which recipe slot selected it. Qualified choices are catalog facts, never runtime qualifier credentials on their icons. -
matches
Identity rules use declared selections, including refinements absent from sanitized icons. -
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
selections
Returns the value of theselectionsrecord component.- Returns:
- the value of the
selectionsrecord component
-