Record Class TrackerView

java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.trackerlens.dashboard.TrackerView
Record Components:
id - the tracker's registered id
stages - the tracker's canonical stage names, in order
metrics - one MetricCardView per stage, in stages order
totalCount - number of currently-active (non-removed) items in this tracker
projection - the completion projection, when at least 7 days of history is available
chartDates - the dates plotted on this tracker's chart, ascending
chartSeries - cumulative reached-count per stage, aligned index-for-index with chartDates
staleItems - active items that have not reached the final stage and have seen no recent activity
stageBreakdown - number of active items whose LifecycleRecord.latestStage(List) is each stage, keyed and ordered exactly like stages - unlike metrics' cumulative "reached at least this stage" counts, these are mutually exclusive and always sum to totalCount, since every active item has exactly one furthest-reached stage
breakdownByDate - stageBreakdown, recomputed as of each date in chartDates (same index order) instead of "now" - each entry sums to however many items were active as of that date, which may differ from totalCount
seriesByGroup - chartSeries, partitioned by LifecycleRecord.group(): group name to per-stage cumulative counts, each aligned index-for-index with chartDates exactly like chartSeries itself. Empty when no record in this tracker carries a non-null group.
matrix - the current-state response-coverage snapshot, when this tracker's source is RESPONSE_COVERAGE - empty for every other kind. Not derived from stageReachedAt/chartSeries the way every other field here is; see ResponseCoverageCell.

public record TrackerView(String id, List<String> stages, List<MetricCardView> metrics, int totalCount, Optional<Projection> projection, List<LocalDate> chartDates, Map<String,List<Integer>> chartSeries, List<LifecycleRecord> staleItems, Map<String,Integer> stageBreakdown, List<Map<String,Integer>> breakdownByDate, Map<String,Map<String,List<Integer>>> seriesByGroup, List<ResponseCoverageCell> matrix) extends Record
Rendered data for one .tracker section of the dashboard.
  • Constructor Details

    • TrackerView

      public TrackerView(String id, List<String> stages, List<MetricCardView> metrics, int totalCount, Optional<Projection> projection, List<LocalDate> chartDates, Map<String,List<Integer>> chartSeries, List<LifecycleRecord> staleItems, Map<String,Integer> stageBreakdown, List<Map<String,Integer>> breakdownByDate)
      Creates a TrackerView with no group-partitioned series and no coverage matrix - equivalent to the canonical constructor with Map.of() and List.of() for those two fields.
      Parameters:
      id - the tracker's registered id
      stages - the tracker's canonical stage names, in order
      metrics - one MetricCardView per stage, in stages order
      totalCount - number of currently-active (non-removed) items in this tracker
      projection - the completion projection, when at least 7 days of history is available
      chartDates - the dates plotted on this tracker's chart, ascending
      chartSeries - cumulative reached-count per stage, aligned index-for-index with chartDates
      staleItems - active items that have not reached the final stage and have seen no recent activity
      stageBreakdown - number of active items whose furthest reached stage is each stage
      breakdownByDate - stageBreakdown, recomputed as of each date in chartDates
    • TrackerView

      public TrackerView(String id, List<String> stages, List<MetricCardView> metrics, int totalCount, Optional<Projection> projection, List<LocalDate> chartDates, Map<String,List<Integer>> chartSeries, List<LifecycleRecord> staleItems, Map<String,Integer> stageBreakdown, List<Map<String,Integer>> breakdownByDate, Map<String,Map<String,List<Integer>>> seriesByGroup, List<ResponseCoverageCell> matrix)
      Creates an instance of a TrackerView record class.
      Parameters:
      id - the value for the id record component
      stages - the value for the stages record component
      metrics - the value for the metrics record component
      totalCount - the value for the totalCount record component
      projection - the value for the projection record component
      chartDates - the value for the chartDates record component
      chartSeries - the value for the chartSeries record component
      staleItems - the value for the staleItems record component
      stageBreakdown - the value for the stageBreakdown record component
      breakdownByDate - the value for the breakdownByDate record component
      seriesByGroup - the value for the seriesByGroup record component
      matrix - the value for the matrix record component
  • Method Details

    • withMatrix

      public TrackerView withMatrix(List<ResponseCoverageCell> matrix)
      Returns a copy of this view with matrix() replaced - the coverage matrix is attached separately from this view's own milestone-based construction, since it comes from a raw re-read of the source file rather than from LifecycleRecords.
      Parameters:
      matrix - the coverage matrix to attach
      Returns:
      a copy of this view with matrix replaced
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • stages

      public List<String> stages()
      Returns the value of the stages record component.
      Returns:
      the value of the stages record component
    • metrics

      public List<MetricCardView> metrics()
      Returns the value of the metrics record component.
      Returns:
      the value of the metrics record component
    • totalCount

      public int totalCount()
      Returns the value of the totalCount record component.
      Returns:
      the value of the totalCount record component
    • projection

      public Optional<Projection> projection()
      Returns the value of the projection record component.
      Returns:
      the value of the projection record component
    • chartDates

      public List<LocalDate> chartDates()
      Returns the value of the chartDates record component.
      Returns:
      the value of the chartDates record component
    • chartSeries

      public Map<String,List<Integer>> chartSeries()
      Returns the value of the chartSeries record component.
      Returns:
      the value of the chartSeries record component
    • staleItems

      public List<LifecycleRecord> staleItems()
      Returns the value of the staleItems record component.
      Returns:
      the value of the staleItems record component
    • stageBreakdown

      public Map<String,Integer> stageBreakdown()
      Returns the value of the stageBreakdown record component.
      Returns:
      the value of the stageBreakdown record component
    • breakdownByDate

      public List<Map<String,Integer>> breakdownByDate()
      Returns the value of the breakdownByDate record component.
      Returns:
      the value of the breakdownByDate record component
    • seriesByGroup

      public Map<String,Map<String,List<Integer>>> seriesByGroup()
      Returns the value of the seriesByGroup record component.
      Returns:
      the value of the seriesByGroup record component
    • matrix

      public List<ResponseCoverageCell> matrix()
      Returns the value of the matrix record component.
      Returns:
      the value of the matrix record component