Record Class RecipeSuggestionAddDTO
java.lang.Object
java.lang.Record
edu.ntnu.idatt2106_2023_06.backend.dto.recipe.RecipeSuggestionAddDTO
- Record Components:
recipeId
- The ID of the recipefridgeId
- The ID of the fridge the suggestion is foruserId
- The ID of the user that is suggesting
public record RecipeSuggestionAddDTO(@NonNull Long recipeId, @NonNull Long fridgeId, @NonNull Long userId)
extends Record
This record represents a DTO for a suggestion of a recipe
-
Constructor Summary
ConstructorsConstructorDescriptionRecipeSuggestionAddDTO
(@NonNull Long recipeId, @NonNull Long fridgeId, @NonNull Long userId) Creates an instance of aRecipeSuggestionAddDTO
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.@NonNull Long
fridgeId()
Returns the value of thefridgeId
record component.final int
hashCode()
Returns a hash code value for this object.@NonNull Long
recipeId()
Returns the value of therecipeId
record component.final String
toString()
Returns a string representation of this record class.@NonNull Long
userId()
Returns the value of theuserId
record component.
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
recipeId
Returns the value of therecipeId
record component.- Returns:
- the value of the
recipeId
record component
-
fridgeId
Returns the value of thefridgeId
record component.- Returns:
- the value of the
fridgeId
record component
-
userId
Returns the value of theuserId
record component.- Returns:
- the value of the
userId
record component
-