Record Class CompactSchema
java.lang.Object
java.lang.Record
com.loomcache.common.serialization.compact.CompactSchema
public record CompactSchema(String typeName, List<CompactField> fields, long fingerprint)
extends Record
Immutable compact schema with a stable fingerprint.
-
Constructor Summary
ConstructorsConstructorDescriptionCompactSchema(String typeName, List<CompactField> fields) CompactSchema(String typeName, List<CompactField> fields, long fingerprint) Creates an instance of aCompactSchemarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.longReturns the value of thefingerprintrecord component.booleanfinal inthashCode()Returns a hash code value for this object.static CompactSchemaof(String typeName, List<CompactField> fields) final StringtoString()Returns a string representation of this record class.typeName()Returns the value of thetypeNamerecord component.
-
Constructor Details
-
CompactSchema
-
CompactSchema
Creates an instance of aCompactSchemarecord class.- Parameters:
typeName- the value for thetypeNamerecord componentfields- the value for thefieldsrecord componentfingerprint- the value for thefingerprintrecord component
-
-
Method Details
-
of
-
hasField
-
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. -
typeName
Returns the value of thetypeNamerecord component.- Returns:
- the value of the
typeNamerecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-
fingerprint
public long fingerprint()Returns the value of thefingerprintrecord component.- Returns:
- the value of the
fingerprintrecord component
-