Record Class ResponseCoverageCell

java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.trackerlens.tracker.ResponseCoverageCell
Record Components:
verb - the HTTP verb, e.g. "GET"
path - the endpoint's path template, e.g. "/v1/foobars"
responseCode - the response code, e.g. "200"
testCount - the number of contract tests currently detected to cover this response code
covered - true when testCount > 0

public record ResponseCoverageCell(String verb, String path, String responseCode, int testCount, boolean covered) extends Record
One cell of the response-coverage snapshot matrix: a currently-declared (verb, path, responseCode) triple, its current test count, and whether that count is positive.

Deliberately not a LifecycleRecord: testCount is a live gauge with no preserved history (unlike every timestamp LifecycleRecord carries), and a matrix needs verb/path/responseCode as three independently pivotable fields rather than fused into one label string - see ResponseCoverageMatrixReader.

  • Constructor Details

    • ResponseCoverageCell

      public ResponseCoverageCell(String verb, String path, String responseCode, int testCount, boolean covered)
      Creates an instance of a ResponseCoverageCell record class.
      Parameters:
      verb - the value for the verb record component
      path - the value for the path record component
      responseCode - the value for the responseCode record component
      testCount - the value for the testCount record component
      covered - the value for the covered record component
  • Method Details

    • 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.
    • verb

      public String verb()
      Returns the value of the verb record component.
      Returns:
      the value of the verb record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • responseCode

      public String responseCode()
      Returns the value of the responseCode record component.
      Returns:
      the value of the responseCode record component
    • testCount

      public int testCount()
      Returns the value of the testCount record component.
      Returns:
      the value of the testCount record component
    • covered

      public boolean covered()
      Returns the value of the covered record component.
      Returns:
      the value of the covered record component