Record Class StatDeleteFromFridgeDTO
java.lang.Object
java.lang.Record
edu.ntnu.idatt2106_2023_06.backend.dto.stat.StatDeleteFromFridgeDTO
public record StatDeleteFromFridgeDTO(Integer amountDeleted, String itemName, String storeName, Long fridgeId)
extends Record
This record represents a DTO for the statistic of deleting from a fridge.
-
Constructor Summary
ConstructorsConstructorDescriptionStatDeleteFromFridgeDTO(Integer amountDeleted, String itemName, String storeName, Long fridgeId) Creates an instance of aStatDeleteFromFridgeDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theamountDeletedrecord component.final booleanIndicates whether some other object is "equal to" this one.fridgeId()Returns the value of thefridgeIdrecord component.final inthashCode()Returns a hash code value for this object.itemName()Returns the value of theitemNamerecord component.Returns the value of thestoreNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StatDeleteFromFridgeDTO
public StatDeleteFromFridgeDTO(Integer amountDeleted, String itemName, String storeName, Long fridgeId) Creates an instance of aStatDeleteFromFridgeDTOrecord class.- Parameters:
amountDeleted- the value for theamountDeletedrecord componentitemName- the value for theitemNamerecord componentstoreName- the value for thestoreNamerecord componentfridgeId- the value for thefridgeIdrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
amountDeleted
Returns the value of theamountDeletedrecord component.- Returns:
- the value of the
amountDeletedrecord component
-
itemName
Returns the value of theitemNamerecord component.- Returns:
- the value of the
itemNamerecord component
-
storeName
Returns the value of thestoreNamerecord component.- Returns:
- the value of the
storeNamerecord component
-
fridgeId
Returns the value of thefridgeIdrecord component.- Returns:
- the value of the
fridgeIdrecord component
-