Record Class DeltaEntry

java.lang.Object
java.lang.Record
org.egothor.methodatlas.DeltaEntry
Record Components:
changeType - the type of change
before - the record from the before scan; null for DeltaEntry.ChangeType.ADDED entries
after - the record from the after scan; null for DeltaEntry.ChangeType.REMOVED entries
changedFields - names of fields that differ between before and after; empty for DeltaEntry.ChangeType.ADDED and DeltaEntry.ChangeType.REMOVED entries

public record DeltaEntry(DeltaEntry.ChangeType changeType, org.egothor.methodatlas.api.ScanRecord before, org.egothor.methodatlas.api.ScanRecord after, Set<String> changedFields) extends Record
A single change entry in a MethodAtlas delta report.

Each entry describes one test method that was added, removed, or modified between two scan outputs. Entries are produced by DeltaReport.compute(java.nio.file.Path, java.nio.file.Path) and consumed by DeltaEmitter to produce human-readable output.

Change types

Changed field names

The changedFields() set uses the following identifiers, which correspond to CSV column names or human-readable labels:

  • "loc" — lines of code changed
  • "tags" — JUnit @Tag set changed
  • "source"content_hash differs (class source was edited); only present when both records have a non-null contentHash
  • "ai_security_relevant" — security-relevance classification flipped; only present when both records have a non-null aiSecurityRelevant
  • "ai_tags" — AI taxonomy tag set changed; only present when both records have non-null aiTags
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The type of change represented by a DeltaEntry.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DeltaEntry(DeltaEntry.ChangeType changeType, org.egothor.methodatlas.api.ScanRecord before, org.egothor.methodatlas.api.ScanRecord after, Set<String> changedFields)
    Creates an instance of a DeltaEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.egothor.methodatlas.api.ScanRecord
    Returns the value of the after record component.
    org.egothor.methodatlas.api.ScanRecord
    Returns the value of the before record component.
    Returns the value of the changedFields record component.
    Returns the value of the changeType record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.egothor.methodatlas.api.ScanRecord
    Returns the primary record for this entry.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DeltaEntry

      public DeltaEntry(DeltaEntry.ChangeType changeType, org.egothor.methodatlas.api.ScanRecord before, org.egothor.methodatlas.api.ScanRecord after, Set<String> changedFields)
      Creates an instance of a DeltaEntry record class.
      Parameters:
      changeType - the value for the changeType record component
      before - the value for the before record component
      after - the value for the after record component
      changedFields - the value for the changedFields record component
  • Method Details

    • record

      public org.egothor.methodatlas.api.ScanRecord record()
      Returns the primary record for this entry.

      For DeltaEntry.ChangeType.ADDED and DeltaEntry.ChangeType.MODIFIED entries this is the after() record. For DeltaEntry.ChangeType.REMOVED entries this is the before() record. Never returns null.

      Returns:
      the representative record for this 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • changeType

      public DeltaEntry.ChangeType changeType()
      Returns the value of the changeType record component.
      Returns:
      the value of the changeType record component
    • before

      public org.egothor.methodatlas.api.ScanRecord before()
      Returns the value of the before record component.
      Returns:
      the value of the before record component
    • after

      public org.egothor.methodatlas.api.ScanRecord after()
      Returns the value of the after record component.
      Returns:
      the value of the after record component
    • changedFields

      public Set<String> changedFields()
      Returns the value of the changedFields record component.
      Returns:
      the value of the changedFields record component