Record Class FieldDefinition
java.lang.Object
java.lang.Record
express.mvp.myra.codec.schema.FieldDefinition
- Record Components:
tag- the 1-based field tag used for ordering and compatibilityname- the field nametype- the field type name (primitive, enum, or message type)optional- whether the field is optionalrepeated- whether the field is a repeating groupdeprecated- whether the field is deprecateddeprecationNote- human-friendly deprecation guidancefixedCapacity- fixed inline capacity for string/bytes fields, or null when variable
-
Constructor Summary
ConstructorsConstructorDescriptionFieldDefinition(int tag, String name, String type, boolean optional, boolean repeated, boolean deprecated, String deprecationNote, Integer fixedCapacity) Creates an instance of aFieldDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedeprecatedrecord component.Returns the value of thedeprecationNoterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefixedCapacityrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanoptional()Returns the value of theoptionalrecord component.booleanrepeated()Returns the value of therepeatedrecord component.inttag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FieldDefinition
public FieldDefinition(int tag, String name, String type, boolean optional, boolean repeated, boolean deprecated, String deprecationNote, Integer fixedCapacity) Creates an instance of aFieldDefinitionrecord class.- Parameters:
tag- the value for thetagrecord componentname- the value for thenamerecord componenttype- the value for thetyperecord componentoptional- the value for theoptionalrecord componentrepeated- the value for therepeatedrecord componentdeprecated- the value for thedeprecatedrecord componentdeprecationNote- the value for thedeprecationNoterecord componentfixedCapacity- the value for thefixedCapacityrecord component
-
-
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. -
tag
-
name
-
type
-
optional
-
repeated
-
deprecated
public boolean deprecated()Returns the value of thedeprecatedrecord component.- Returns:
- the value of the
deprecatedrecord component
-
deprecationNote
Returns the value of thedeprecationNoterecord component.- Returns:
- the value of the
deprecationNoterecord component
-
fixedCapacity
Returns the value of thefixedCapacityrecord component.- Returns:
- the value of the
fixedCapacityrecord component
-