Record Class Radio
java.lang.Object
java.lang.Record
io.micronaut.views.fields.elements.Radio
- Record Components:
value- the value of the input radio elementid- It defines an identifier (ID) which must be unique in the whole documentlabel- represents a caption for an item in a user interfacechecked- whether the radio button is checkeddisabled- whether the radio button is disabled
- All Implemented Interfaces:
FormElement
@Introspected(builder=@IntrospectionBuilder(builderClass=Radio.Builder.class))
public record Radio(@NonNull String value, @Nullable String id, @NonNull Message label, @NonNull boolean checked, boolean disabled)
extends Record
implements FormElement
A Radio Form Element.
- Since:
- 4.1.0
- Author:
- Sergio del Amo
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Radio.Builderbuilder()@NonNull booleanchecked()Returns the value of thecheckedrecord component.booleandisabled()Returns the value of thedisabledrecord component.final booleanIndicates whether some other object is "equal to" this one.@NonNull StringgetId()@NonNull MessagegetLabel()@NonNull StringgetValue()final inthashCode()Returns a hash code value for this object.@Nullable Stringid()Returns the value of theidrecord component.boolean@NonNull Messagelabel()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.@NonNull Stringvalue()Returns the value of thevaluerecord component.Methods inherited from interface FormElement
getTag
-
Constructor Details
-
Radio
-
-
Method Details
-
isChecked
public boolean isChecked()- Returns:
- whether the radio button is checked
-
getValue
- Returns:
- the value of the input radio element
-
getId
- Returns:
- It defines an identifier (ID) which must be unique in the whole document
-
getLabel
- Returns:
- represents a caption for an item in a user interface
-
builder
- Returns:
- A Radio Builder.
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
value
-
id
-
label
-
checked
-
disabled
-