Record Class InputRadioFormElement
java.lang.Object
java.lang.Record
io.micronaut.views.fields.elements.InputRadioFormElement
- Record Components:
name
- Name of the form control. Submitted with the form as part of a name/value pairrequired
- If true indicates that the user must specify a value for the input before the owning form can be submitted.- Radio Buttons
label
- HTML label
- All Implemented Interfaces:
InputFormElement
,FormElement
@Introspected(builder=@IntrospectionBuilder(builderClass=Builder.class))
public record InputRadioFormElement(@NonNull String name, boolean required, @NonNull List<Radio> buttons, @NonNull Message label)
extends Record
implements InputFormElement
Input Radio.
- Since:
- 4.1.0
- Author:
- Sergio del Amo
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionInputRadioFormElement
(@NonNull String name, boolean required, @NonNull List<Radio> buttons, @NonNull Message label) Creates an instance of aInputRadioFormElement
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
buttons()
Returns the value of thebuttons
record component.final boolean
Indicates whether some other object is "equal to" this one.@NonNull InputType
getType()
final int
hashCode()
Returns a hash code value for this object.@NonNull Message
label()
Returns the value of thelabel
record component.@NonNull String
name()
Returns the value of thename
record component.boolean
required()
Returns the value of therequired
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.views.fields.elements.InputFormElement
getTag
-
Constructor Details
-
Method Details
-
getType
- Specified by:
getType
in interfaceInputFormElement
- Returns:
- Value of the type attribute of an input tag
-
builder
- Returns:
- Creates a
InputRadioFormElement.Builder
.
-
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 '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
required
public boolean required()Returns the value of therequired
record component.- Returns:
- the value of the
required
record component
-
buttons
Returns the value of thebuttons
record component.- Returns:
- the value of the
buttons
record component
-
label
Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-