Record Class ItemRemoveDTO
java.lang.Object
java.lang.Record
edu.ntnu.idatt2106_2023_06.backend.dto.items.ItemRemoveDTO
- Record Components:
itemName
- Name of the item to remove, given as a Stringstore
- Name of the store, given as a StringfridgeId
- ID of the fridge, given as a Long objectquantity
- Amount to remove, given as an int
-
Constructor Summary
ConstructorsConstructorDescriptionItemRemoveDTO
(String itemName, String store, Long fridgeId, int quantity) Creates an instance of aItemRemoveDTO
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.fridgeId()
Returns the value of thefridgeId
record component.final int
hashCode()
Returns a hash code value for this object.itemName()
Returns the value of theitemName
record component.int
quantity()
Returns the value of thequantity
record component.store()
Returns the value of thestore
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
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 '=='. -
itemName
Returns the value of theitemName
record component.- Returns:
- the value of the
itemName
record component
-
store
Returns the value of thestore
record component.- Returns:
- the value of the
store
record component
-
fridgeId
Returns the value of thefridgeId
record component.- Returns:
- the value of the
fridgeId
record component
-
quantity
public int quantity()Returns the value of thequantity
record component.- Returns:
- the value of the
quantity
record component
-