Package dev.omnist.schema
Record Class Record
java.lang.Object
java.lang.Record
dev.omnist.schema.Record
- Record Components:
name- the record type name; must not benulland must not be a reserved keywordfields- the ordered list of field declarations;nullis normalized to an empty list
An immutable record definition in the OSD schema model (omnist-spec ยง5.5).
A record has a unique name and an ordered list of
Field declarations.
The canonical ordering of fields within a record is preserved exactly as declared.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Looks up a field by its label, returning the first match in declaration order.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
field
Looks up a field by its label, returning the first match in declaration order.- Parameters:
label- the field label to look up- Returns:
- the matching
Field, ornullif no field with that label exists
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-