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 Details

    • ClientSideComponentDto

      public ClientSideComponentDto(ComponentMetadataDto metadata, String id, List<ComponentDto> children, String style, String cssClasses, String slot)
      Creates an instance of a ClientSideComponentDto record class.
      Parameters:
      metadata - the value for the metadata record component
      id - the value for the id record component
      children - the value for the children record component
      style - the value for the style record component
      cssClasses - the value for the cssClasses record component
      slot - the value for the slot record component
  • Method Details

    • children

      public List<ComponentDto> children()
      Returns the value of the children record component.
      Specified by:
      children in interface ComponentDto
      Returns:
      the value of the children record component
    • setStyle

      public ComponentDto setStyle(String style)
      Specified by:
      setStyle in interface ComponentDto
    • addStyle

      public ComponentDto addStyle(String style)
      Specified by:
      addStyle in interface ComponentDto
    • setSlot

      public ComponentDto setSlot(String slot)
      Specified by:
      setSlot in interface ComponentDto
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • metadata

      public ComponentMetadataDto metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • id

      public String id()
      Returns the value of the id record component.
      Specified by:
      id in interface ComponentDto
      Returns:
      the value of the id record component
    • style

      public String style()
      Returns the value of the style record component.
      Specified by:
      style in interface ComponentDto
      Returns:
      the value of the style record component
    • cssClasses

      public String cssClasses()
      Returns the value of the cssClasses record component.
      Specified by:
      cssClasses in interface ComponentDto
      Returns:
      the value of the cssClasses record component
    • slot

      public String slot()
      Returns the value of the slot record component.
      Returns:
      the value of the slot record component