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 aStatDeleteFromFridgeDTO
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theamountDeleted
record component.final 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.Returns the value of thestoreName
record component.final String
toString()
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 aStatDeleteFromFridgeDTO
record class.- Parameters:
amountDeleted
- the value for theamountDeleted
record componentitemName
- the value for theitemName
record componentstoreName
- the value for thestoreName
record componentfridgeId
- the value for thefridgeId
record 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 theamountDeleted
record component.- Returns:
- the value of the
amountDeleted
record component
-
itemName
Returns the value of theitemName
record component.- Returns:
- the value of the
itemName
record component
-
storeName
Returns the value of thestoreName
record component.- Returns:
- the value of the
storeName
record component
-
fridgeId
Returns the value of thefridgeId
record component.- Returns:
- the value of the
fridgeId
record component
-