Package com.darkcollective.relix.symbol
Record Class ArrayType
java.lang.Object
java.lang.Record
com.darkcollective.relix.symbol.ArrayType
- Record Components:
element- the element type; must not be null
- All Implemented Interfaces:
Type
A nested array type — an ordered collection of elements of a single
element type (which may itself be nested).
An array of heterogeneous or unknown elements is modelled as
ArrayType(ScalarType.ANY), consistent with schema-on-read: the element
type is then resolved per element at runtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()A compact, structurally-recursive type code used in the IR report and in machine-readable (JSON) output.display()A short, human-readable, structurally-recursive description of this type — e.g.element()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArrayType
Creates an instance of aArrayTyperecord class.- Parameters:
element- the value for theelementrecord component
-
-
Method Details
-
display
Description copied from interface:TypeA short, human-readable, structurally-recursive description of this type — e.g."number","struct{id: number, tags: array<string>}","array<number>". -
code
Description copied from interface:TypeA compact, structurally-recursive type code used in the IR report and in machine-readable (JSON) output. Scalars are one letter (Number,String,Boolean,?=any); an array is[elem]and a struct is{field:code,…}— e.g.[N],{id:N,tags:[S]}. -
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). -
element
Returns the value of theelementrecord component.- Returns:
- the value of the
elementrecord component
-