Record Class AgreementComponent.RadioButtonGroup

java.lang.Object
java.lang.Record
velox.api.layer1.agreement.AgreementComponent.RadioButtonGroup
Record Components:
id - Unique identifier for the radio button group. Used to store the user's selection in the agreements database with the selected option id. Should be unique across all components in the agreement. Should not change for a specific radio buttons group of a given agreement every time the agreement is shown with the given agreementId.
labelText - The text label displayed above the radio button group (for example, could be a question that the user needs to answer by selecting one of the options)
options - The options for the radio button group. Each option has an id (which is stored in the agreements database when the user selects that option) and the text to display next to the radio button for that option.
All Implemented Interfaces:
AgreementComponent
Enclosing interface:
AgreementComponent

public static record AgreementComponent.RadioButtonGroup(String id, String labelText, AgreementComponent.RadioButtonGroup.Option[] options) extends Record implements AgreementComponent
A radio button group component that presents the user with a set of mutually exclusive options. The user must select exactly one option before accepting the agreement.
  • Constructor Details

  • Method Details

    • 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.
    • id

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

      public String labelText()
      Returns the value of the labelText record component.
      Returns:
      the value of the labelText record component
    • options

      Returns the value of the options record component.
      Returns:
      the value of the options record component