Record Class MealResponseDTO
java.lang.Object
java.lang.Record
br.com.receitaquedoimenos.ReceitaQueDoiMenos.models.meal.MealResponseDTO
- Record Components:
name- String referente ao nometypeMeal- Enum referente ao tipo da refeiçãophoto- String URL de uma imagemvideo- String URL de um vÃdeoingredients- ArrayList contendo os ingredientesinstructions- String referente ao modo de preparocreator- String referente ao criador da refeição
public record MealResponseDTO(String name, TypeMeal typeMeal, String photo, String video, ArrayList<String> ingredients, String instructions, UserCreatorRecipeResponseDTO creator)
extends Record
Informações referentes a um drink criados ou atualizados retornados pelo sistema
- Author:
- Pedro Henrique Pereira de Oliveira
-
Constructor Summary
ConstructorsConstructorDescriptionMealResponseDTO(String name, TypeMeal typeMeal, String photo, String video, ArrayList<String> ingredients, String instructions, UserCreatorRecipeResponseDTO creator) Creates an instance of aMealResponseDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreator()Returns the value of thecreatorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theingredientsrecord component.Returns the value of theinstructionsrecord component.name()Returns the value of thenamerecord component.photo()Returns the value of thephotorecord component.final StringtoString()Returns a string representation of this record class.typeMeal()Returns the value of thetypeMealrecord component.video()Returns the value of thevideorecord component.
-
Constructor Details
-
MealResponseDTO
public MealResponseDTO(String name, TypeMeal typeMeal, String photo, String video, ArrayList<String> ingredients, String instructions, UserCreatorRecipeResponseDTO creator) Creates an instance of aMealResponseDTOrecord class.- Parameters:
name- the value for thenamerecord componenttypeMeal- the value for thetypeMealrecord componentphoto- the value for thephotorecord componentvideo- the value for thevideorecord componentingredients- the value for theingredientsrecord componentinstructions- the value for theinstructionsrecord componentcreator- the value for thecreatorrecord 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
typeMeal
Returns the value of thetypeMealrecord component.- Returns:
- the value of the
typeMealrecord component
-
photo
Returns the value of thephotorecord component.- Returns:
- the value of the
photorecord component
-
video
Returns the value of thevideorecord component.- Returns:
- the value of the
videorecord component
-
ingredients
Returns the value of theingredientsrecord component.- Returns:
- the value of the
ingredientsrecord component
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
creator
Returns the value of thecreatorrecord component.- Returns:
- the value of the
creatorrecord component
-