Package io.mateu.dtos
Record Class ClientSideComponentDto
java.lang.Object
java.lang.Record
io.mateu.dtos.ClientSideComponentDto
- All Implemented Interfaces:
ComponentDto
public record ClientSideComponentDto(ComponentMetadataDto metadata, String id, List<ComponentDto> children, String style, String cssClasses, String slot)
extends Record
implements ComponentDto
-
Constructor Summary
ConstructorsConstructorDescriptionClientSideComponentDto(ComponentMetadataDto metadata, String id, List<ComponentDto> children, String style, String cssClasses, String slot) Creates an instance of aClientSideComponentDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.Returns the value of thecssClassesrecord 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.metadata()Returns the value of themetadatarecord component.slot()Returns the value of theslotrecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.mateu.dtos.ComponentDto
withChildren
-
Constructor Details
-
ClientSideComponentDto
public ClientSideComponentDto(ComponentMetadataDto metadata, String id, List<ComponentDto> children, String style, String cssClasses, String slot) Creates an instance of aClientSideComponentDtorecord class.- Parameters:
metadata- the value for themetadatarecord componentid- the value for theidrecord componentchildren- the value for thechildrenrecord componentstyle- the value for thestylerecord componentcssClasses- the value for thecssClassesrecord componentslot- the value for theslotrecord component
-
-
Method Details
-
children
Returns the value of thechildrenrecord component.- Specified by:
childrenin interfaceComponentDto- Returns:
- the value of the
childrenrecord component
-
setStyle
- Specified by:
setStylein interfaceComponentDto
-
addStyle
- Specified by:
addStylein interfaceComponentDto
-
setSlot
- Specified by:
setSlotin interfaceComponentDto
-
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). -
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
id
Returns the value of theidrecord component.- Specified by:
idin interfaceComponentDto- Returns:
- the value of the
idrecord component
-
style
Returns the value of thestylerecord component.- Specified by:
stylein interfaceComponentDto- Returns:
- the value of the
stylerecord component
-
cssClasses
Returns the value of thecssClassesrecord component.- Specified by:
cssClassesin interfaceComponentDto- Returns:
- the value of the
cssClassesrecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-