Record Class RecipePreviewContext.Selection
java.lang.Object
java.lang.Record
ke.ric.cooking.data.RecipePreviewContext.Selection
- Enclosing class:
RecipePreviewContext
public static record RecipePreviewContext.Selection(int recipeSlot, int optionIndex, RecipeItemRef itemRef, String qualifier, String customTag, int quantity)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSelection(int recipeSlot, int optionIndex, RecipeItemRef itemRef, String qualifier, String customTag, int quantity) Creates an instance of aSelectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomTagrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.itemRef()Returns the value of theitemRefrecord component.of(int slot, int optionIndex, IngredientOption option, int quantity) intReturns the value of theoptionIndexrecord component.Returns the value of thequalifierrecord component.intquantity()Returns the value of thequantityrecord component.intReturns the value of therecipeSlotrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Selection
public Selection(int recipeSlot, int optionIndex, RecipeItemRef itemRef, String qualifier, String customTag, int quantity) Creates an instance of aSelectionrecord class.- Parameters:
recipeSlot- the value for therecipeSlotrecord componentoptionIndex- the value for theoptionIndexrecord componentitemRef- the value for theitemRefrecord componentqualifier- the value for thequalifierrecord componentcustomTag- the value for thecustomTagrecord componentquantity- the value for thequantityrecord component
-
-
Method Details
-
of
public static RecipePreviewContext.Selection of(int slot, int optionIndex, IngredientOption option, int quantity) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
recipeSlot
public int recipeSlot()Returns the value of therecipeSlotrecord component.- Returns:
- the value of the
recipeSlotrecord component
-
optionIndex
public int optionIndex()Returns the value of theoptionIndexrecord component.- Returns:
- the value of the
optionIndexrecord component
-
itemRef
Returns the value of theitemRefrecord component.- Returns:
- the value of the
itemRefrecord component
-
qualifier
Returns the value of thequalifierrecord component.- Returns:
- the value of the
qualifierrecord component
-
customTag
Returns the value of thecustomTagrecord component.- Returns:
- the value of the
customTagrecord component
-
quantity
public int quantity()Returns the value of thequantityrecord component.- Returns:
- the value of the
quantityrecord component
-