Package io.mateu.dtos
Record Class BannerDto
java.lang.Object
java.lang.Record
io.mateu.dtos.BannerDto
- Record Components:
theme- The banner theme: success, error, info, ...hasIcon- The banner iconhasCloseButton- If this banner is closeabletitle- The banner titledescription- The banner text
public record BannerDto(BannerThemeDto theme, boolean hasIcon, boolean hasCloseButton, String title, String description)
extends Record
A banner. Similar to message, but with a different behaviour
-
Constructor Summary
ConstructorsConstructorDescriptionBannerDto(BannerThemeDto theme, boolean hasIcon, boolean hasCloseButton, String title, String description) Creates an instance of aBannerDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasCloseButtonrecord component.final inthashCode()Returns a hash code value for this object.booleanhasIcon()Returns the value of thehasIconrecord component.theme()Returns the value of thethemerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BannerDto
public BannerDto(BannerThemeDto theme, boolean hasIcon, boolean hasCloseButton, String title, String description) Creates an instance of aBannerDtorecord class.- Parameters:
theme- the value for thethemerecord componenthasIcon- the value for thehasIconrecord componenthasCloseButton- the value for thehasCloseButtonrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
theme
Returns the value of thethemerecord component.- Returns:
- the value of the
themerecord component
-
hasIcon
public boolean hasIcon()Returns the value of thehasIconrecord component.- Returns:
- the value of the
hasIconrecord component
-
hasCloseButton
public boolean hasCloseButton()Returns the value of thehasCloseButtonrecord component.- Returns:
- the value of the
hasCloseButtonrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-