Record Class StudySession.FormField
java.lang.Object
java.lang.Record
com.amalgamasimulation.studies.core.StudySession.FormField
- Enclosing class:
StudySession
public static record StudySession.FormField(String key, String title, StudySession.FieldType type, boolean required, List<StudySession.Option> options, Map<String,Object> uiHints)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFormField(String key, String title, StudySession.FieldType type, boolean required, List<StudySession.Option> options, Map<String, Object> uiHints) Creates an instance of aFormFieldrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.options()Returns the value of theoptionsrecord component.booleanrequired()Returns the value of therequiredrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.uiHints()Returns the value of theuiHintsrecord component.
-
Constructor Details
-
FormField
public FormField(String key, String title, StudySession.FieldType type, boolean required, List<StudySession.Option> options, Map<String, Object> uiHints) Creates an instance of aFormFieldrecord class.- Parameters:
key- the value for thekeyrecord componenttitle- the value for thetitlerecord componenttype- the value for thetyperecord componentrequired- the value for therequiredrecord componentoptions- the value for theoptionsrecord componentuiHints- the value for theuiHintsrecord component
-
-
Method Details
-
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 '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
uiHints
Returns the value of theuiHintsrecord component.- Returns:
- the value of the
uiHintsrecord component
-