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 header
fileName - the packed file's name — a bare filename with no directory separators, resolved relative to the dataset directory
identifierCount - the number of unique identifiers the file holds; never negative
checksum - 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 Details

    • MAX_ENTITY_TYPE_LENGTH

      public static final int MAX_ENTITY_TYPE_LENGTH
      Maximum length, in ASCII characters, of entityType.
      See Also:
  • Constructor Details

    • EntityTypeEntry

      public EntityTypeEntry(String entityType, String fileName, long identifierCount, String checksum)
      Validates the entry.
  • Method Details

    • crc32cReference

      public static String crc32cReference(long crc32c)
      Renders a CRC32C value as a manifest checksum reference: "crc32c:" followed by the value's low 32 bits as 8 lowercase hex digits. This is the exact string checksum() is validated against and that DeletionChecker compares each loaded file's checksum to.
      Parameters:
      crc32c - the CRC32C, as an unsigned 32-bit value in the low bits
      Returns:
      the checksum string for a manifest entry
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entityType

      public String entityType()
      Returns the value of the entityType record component.
      Returns:
      the value of the entityType record component
    • fileName

      public String fileName()
      Returns the value of the fileName record component.
      Returns:
      the value of the fileName record component
    • identifierCount

      public long identifierCount()
      Returns the value of the identifierCount record component.
      Returns:
      the value of the identifierCount record component
    • checksum

      public String checksum()
      Returns the value of the checksum record component.
      Returns:
      the value of the checksum record component