Record Class MenuInventory
java.lang.Object
java.lang.Record
csce331.group13.project2.models.MenuInventory
- Record Components:
- The UUID of the menu item.inventoryItemId- The UUID of the inventory item.qtyPerUnit- The quantity of the inventory item needed per menu item unit.
public record MenuInventory(UUID menuItemId, UUID inventoryItemId, BigDecimal qtyPerUnit)
extends Record
Represents the relationship between a menu item and an inventory item.
Indicates how much of an inventory item is needed to make one unit of a menu item.
- Author:
- Varish Kongara
-
Constructor Summary
ConstructorsConstructorDescriptionMenuInventory(UUID menuItemId, UUID inventoryItemId, BigDecimal qtyPerUnit) Creates an instance of aMenuInventoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinventoryItemIdrecord component.Returns the value of themenuItemIdrecord component.Returns the value of theqtyPerUnitrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MenuInventory
Creates an instance of aMenuInventoryrecord class.- Parameters:
menuItemId- the value for themenuItemIdrecord componentinventoryItemId- the value for theinventoryItemIdrecord componentqtyPerUnit- the value for theqtyPerUnitrecord component
-
-
Method Details
-
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). -
inventoryItemId
Returns the value of theinventoryItemIdrecord component.- Returns:
- the value of the
inventoryItemIdrecord component
-
qtyPerUnit
Returns the value of theqtyPerUnitrecord component.- Returns:
- the value of the
qtyPerUnitrecord component
-