Package io.mateu.dtos
Record Class MessageDto
java.lang.Object
java.lang.Record
io.mateu.dtos.MessageDto
- Record Components:
title- The message titletext- The message text
public record MessageDto(NotificationVariantDto variant, NotificationPositionDto position, String title, String text, int duration)
extends Record
A message to be shown to the user
-
Constructor Summary
ConstructorsConstructorDescriptionMessageDto(NotificationVariantDto variant, NotificationPositionDto position, String title, String text, int duration) Creates an instance of aMessageDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.position()Returns the value of thepositionrecord component.text()Returns the value of thetextrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.variant()Returns the value of thevariantrecord component.
-
Constructor Details
-
MessageDto
public MessageDto(NotificationVariantDto variant, NotificationPositionDto position, String title, String text, int duration) Creates an instance of aMessageDtorecord class.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
variant
Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-