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 aRecipeSuggestionAddDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NonNull LongfridgeId()Returns the value of thefridgeIdrecord component.final inthashCode()Returns a hash code value for this object.@NonNull LongrecipeId()Returns the value of therecipeIdrecord component.final StringtoString()Returns a string representation of this record class.@NonNull LonguserId()Returns the value of theuserIdrecord 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 therecipeIdrecord component.- Returns:
- the value of the
recipeIdrecord component
-
fridgeId
Returns the value of thefridgeIdrecord component.- Returns:
- the value of the
fridgeIdrecord component
-
userId
Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-