Record Class EntityTypeEntry
java.lang.Object
java.lang.Record
com.marksayson.deletionchecker.manifest.EntityTypeEntry
- Record Components:
entityType- the entity type name; 1 to 64 ASCII characters, matching the entity type's packed-file headerfileName- the packed file's name — a bare filename with no directory separators, resolved relative to the dataset directoryidentifierCount- the number of unique identifiers the file holds; never negativechecksum- the file's expected checksum, formatted as"crc32c:"followed by 8 lowercase hex digits
public record EntityTypeEntry(String entityType, String fileName, long identifierCount, String checksum)
extends Record
One entity type's entry in the dataset manifest.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum length, in ASCII characters, ofentityType. -
Constructor Summary
ConstructorsConstructorDescriptionEntityTypeEntry(String entityType, String fileName, long identifierCount, String checksum) Validates the entry. -
Method Summary
Modifier and TypeMethodDescriptionchecksum()Returns the value of thechecksumrecord component.static Stringcrc32cReference(long crc32c) Renders a CRC32C value as a manifestchecksumreference:"crc32c:"followed by the value's low 32 bits as 8 lowercase hex digits.Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theidentifierCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MAX_ENTITY_TYPE_LENGTH
public static final int MAX_ENTITY_TYPE_LENGTHMaximum length, in ASCII characters, ofentityType.- See Also:
-
-
Constructor Details
-
EntityTypeEntry
Validates the entry.
-
-
Method Details
-
crc32cReference
Renders a CRC32C value as a manifestchecksumreference:"crc32c:"followed by the value's low 32 bits as 8 lowercase hex digits. This is the exact stringchecksum()is validated against and thatDeletionCheckercompares each loaded file's checksum to.- Parameters:
crc32c- the CRC32C, as an unsigned 32-bit value in the low bits- Returns:
- the
checksumstring for a manifest entry
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
entityType
Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
identifierCount
public long identifierCount()Returns the value of theidentifierCountrecord component.- Returns:
- the value of the
identifierCountrecord component
-
checksum
Returns the value of thechecksumrecord component.- Returns:
- the value of the
checksumrecord component
-