Record Class InputTimeFormElement
java.lang.Object
java.lang.Record
io.micronaut.views.fields.elements.InputTimeFormElement
- Record Components:
name
- Name of the form control. Submitted with the form as part of a name/value pairid
- It defines an identifier (ID) which must be unique in the whole documentrequired
- If true indicates that the user must specify a value for the input before the owning form can be submitted.max
- The latest date to acceptmin
- The earliest date to accept.value
- the input date valuelabel
- represents a caption for an item in a user interfaceerrors
- Form element validation Errors.
- All Implemented Interfaces:
FormElementAttributes
,GlobalAttributes
,InputFormElement
,FormElement
@Introspected(builder=@IntrospectionBuilder(builderClass=Builder.class))
public record InputTimeFormElement(@NonNull String name, @Nullable String id, boolean required, @Nullable LocalTime max, @Nullable LocalTime min, @Nullable LocalTime value, @Nullable Message label, @NonNull List<Message> errors)
extends Record
implements InputFormElement, GlobalAttributes, FormElementAttributes
Input Time.
- Since:
- 4.1.0
- Author:
- Sergio del Amo
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Input Date Builder. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull InputTimeFormElement.Builder
builder()
final boolean
Indicates whether some other object is "equal to" this one.errors()
Returns the value of theerrors
record component.@NonNull InputType
getType()
final int
hashCode()
Returns a hash code value for this object.@Nullable String
id()
Returns the value of theid
record component.@Nullable Message
label()
Returns the value of thelabel
record component.@Nullable LocalTime
max()
Returns the value of themax
record component.@Nullable LocalTime
min()
Returns the value of themin
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.@Nullable LocalTime
value()
Returns the value of thevalue
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micronaut.views.fields.elements.FormElementAttributes
hasErrors
Methods inherited from interface io.micronaut.views.fields.elements.InputFormElement
getTag
-
Constructor Details
-
InputTimeFormElement
public InputTimeFormElement(@NonNull @NonNull String name, @Nullable @Nullable String id, boolean required, @Nullable @Nullable LocalTime max, @Nullable @Nullable LocalTime min, @Nullable @Nullable LocalTime value, @Nullable @Nullable Message label, @NonNull @NonNull List<Message> errors) Creates an instance of aInputTimeFormElement
record class.- Parameters:
name
- the value for thename
record componentid
- the value for theid
record componentrequired
- the value for therequired
record componentmax
- the value for themax
record componentmin
- the value for themin
record componentvalue
- the value for thevalue
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
-
builder
- Returns:
- the Input Date FormElement 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.- Specified by:
name
in interfaceFormElementAttributes
- Returns:
- the value of the
name
record component
-
id
Returns the value of theid
record component.- Specified by:
id
in interfaceGlobalAttributes
- Returns:
- the value of the
id
record component
-
required
public boolean required()Returns the value of therequired
record component.- Specified by:
required
in interfaceGlobalAttributes
- Returns:
- the value of the
required
record component
-
max
Returns the value of themax
record component.- Returns:
- the value of the
max
record component
-
min
Returns the value of themin
record component.- Returns:
- the value of the
min
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
label
Returns the value of thelabel
record component.- Specified by:
label
in interfaceFormElementAttributes
- Returns:
- the value of the
label
record component
-
errors
Returns the value of theerrors
record component.- Specified by:
errors
in interfaceFormElementAttributes
- Returns:
- the value of the
errors
record component
-