Record Class DrinkResponseDTO
java.lang.Object
java.lang.Record
br.com.receitaquedoimenos.ReceitaQueDoiMenos.models.drink.DrinkResponseDTO
- Record Components:
name- String correspondente ao nome do DrinktypeDrink- Enumerador correspondente ao tipo de DrinksphotoURL- String correspondente a URL da foto do DrinkvideoURL- String correspondente a URL do vÃdeo do Drinkingredients- Arraylist que corresponde aos ingredientes do Drinkinstructions- String correspondente ao modo de preparo de cada Drinkcreator- Informações relacionadas ao criador de cada drink
public record DrinkResponseDTO(String id, String name, TypeDrink typeDrink, String photoURL, String videoURL, 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
ConstructorsConstructorDescriptionDrinkResponseDTO(String id, String name, TypeDrink typeDrink, String photoURL, String videoURL, ArrayList<String> ingredients, String instructions, UserCreatorRecipeResponseDTO creator) Creates an instance of aDrinkResponseDTOrecord 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.id()Returns the value of theidrecord component.Returns the value of theingredientsrecord component.Returns the value of theinstructionsrecord component.name()Returns the value of thenamerecord component.photoURL()Returns the value of thephotoURLrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeDrinkrecord component.videoURL()Returns the value of thevideoURLrecord component.
-
Constructor Details
-
DrinkResponseDTO
public DrinkResponseDTO(String id, String name, TypeDrink typeDrink, String photoURL, String videoURL, ArrayList<String> ingredients, String instructions, UserCreatorRecipeResponseDTO creator) Creates an instance of aDrinkResponseDTOrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componenttypeDrink- the value for thetypeDrinkrecord componentphotoURL- the value for thephotoURLrecord componentvideoURL- the value for thevideoURLrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
typeDrink
Returns the value of thetypeDrinkrecord component.- Returns:
- the value of the
typeDrinkrecord component
-
photoURL
Returns the value of thephotoURLrecord component.- Returns:
- the value of the
photoURLrecord component
-
videoURL
Returns the value of thevideoURLrecord component.- Returns:
- the value of the
videoURLrecord 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
-