Record Class CATypeFieldDeclaration
java.lang.Object
java.lang.Record
com.io7m.cardant.model.type_package.CATypeFieldDeclaration
- Record Components:
name- The field namedescription- The field descriptiontype- The field typeisRequired-trueif the field is required
public record CATypeFieldDeclaration(CANameUnqualified name, String description, CATypeScalarIdentifier type, boolean isRequired)
extends Record
A field declared within a record type.
-
Constructor Summary
ConstructorsConstructorDescriptionCATypeFieldDeclaration(CANameUnqualified name, String description, CATypeScalarIdentifier type, boolean isRequired) A field declared within a record type. -
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
-
CATypeFieldDeclaration
public CATypeFieldDeclaration(CANameUnqualified name, String description, CATypeScalarIdentifier type, boolean isRequired) A field declared within a record type.- Parameters:
name- The field namedescription- The field descriptiontype- The field typeisRequired-trueif the field is required
-
-
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
-