Record Class InputCheckboxFormElement
java.lang.Object
java.lang.Record
io.micronaut.views.fields.elements.InputCheckboxFormElement
- Record Components:
checkboxes
- Checkboxeslabel
- HTML labelerrors
- errors associated with this input
- All Implemented Interfaces:
InputFormElement
,FormElement
@Introspected(builder=@IntrospectionBuilder(builderClass=Builder.class))
public record InputCheckboxFormElement(@NonNull List<Checkbox> checkboxes, @NonNull Message label, @NonNull List<Message> errors)
extends Record
implements InputFormElement
- Since:
- 4.1.0
- Author:
- Sergio del Amo
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Input checkbox builder. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull InputCheckboxFormElement.Builder
builder()
Returns the value of thecheckboxes
record component.final boolean
Indicates whether some other object is "equal to" this one.errors()
Returns the value of theerrors
record component.@NonNull InputType
getType()
boolean
final int
hashCode()
Returns a hash code value for this object.@NonNull Message
label()
Returns the value of thelabel
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
-
InputCheckboxFormElement
public InputCheckboxFormElement(@NonNull @NonNull List<Checkbox> checkboxes, @NonNull @NonNull Message label, @NonNull @NonNull List<Message> errors) Creates an instance of aInputCheckboxFormElement
record class.- Parameters:
checkboxes
- the value for thecheckboxes
record componentlabel
- the value for thelabel
record componenterrors
- the value for theerrors
record component
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceInputFormElement
- Returns:
- Value of the type attribute of an input tag
-
hasErrors
public boolean hasErrors()- Returns:
- Whether the form element has validation errors
-
builder
- Returns:
- Creates a
InputCheckboxFormElement
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
checkboxes
Returns the value of thecheckboxes
record component.- Returns:
- the value of the
checkboxes
record component
-
label
Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-
errors
Returns the value of theerrors
record component.- Returns:
- the value of the
errors
record component
-