Record Class CATypeField
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CATypeField
- Record Components:
name- The field namedescription- The field descriptiontype- The scalar typeisRequired-trueif the field must be present
public record CATypeField(CATypeRecordFieldIdentifier name, String description, CATypeScalarType type, boolean isRequired)
extends Record
A field in a type declaration.
-
Constructor Summary
ConstructorsConstructorDescriptionCATypeField(CATypeRecordFieldIdentifier name, String description, CATypeScalarType type, boolean isRequired) A field in a type declaration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisRequiredrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
CATypeField
public CATypeField(CATypeRecordFieldIdentifier name, String description, CATypeScalarType type, boolean isRequired) A field in a type declaration.- Parameters:
name- The field namedescription- The field descriptiontype- The scalar typeisRequired-trueif the field must be present
-
-
Method Details
-
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. -
name
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
type
-
isRequired
public boolean isRequired()Returns the value of theisRequiredrecord component.- Returns:
- the value of the
isRequiredrecord component
-