Record Class TrackerView
java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.trackerlens.dashboard.TrackerView
- Record Components:
id- the tracker's registered idstages- the tracker's canonical stage names, in ordermetrics- oneMetricCardViewper stage, instagesordertotalCount- number of currently-active (non-removed) items in this trackerprojection- the completion projection, when at least 7 days of history is availablechartDates- the dates plotted on this tracker's chart, ascendingchartSeries- cumulative reached-count per stage, aligned index-for-index withchartDatesstaleItems- active items that have not reached the final stage and have seen no recent activitystageBreakdown- number of active items whoseLifecycleRecord.latestStage(List)is each stage, keyed and ordered exactly likestages- unlikemetrics' cumulative "reached at least this stage" counts, these are mutually exclusive and always sum tototalCount, since every active item has exactly one furthest-reached stagebreakdownByDate-stageBreakdown, recomputed as of each date inchartDates(same index order) instead of "now" - each entry sums to however many items were active as of that date, which may differ fromtotalCountseriesByGroup-chartSeries, partitioned byLifecycleRecord.group(): group name to per-stage cumulative counts, each aligned index-for-index withchartDatesexactly likechartSeriesitself. Empty when no record in this tracker carries a non-null group.matrix- the current-state response-coverage snapshot, when this tracker's source isRESPONSE_COVERAGE- empty for every other kind. Not derived fromstageReachedAt/chartSeriesthe way every other field here is; seeResponseCoverageCell.
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 Summary
ConstructorsConstructorDescriptionTrackerView(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 aTrackerViewwith no group-partitioned series and no coverage matrix - equivalent to the canonical constructor withMap.of()andList.of()for those two fields.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 aTrackerViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebreakdownByDaterecord component.Returns the value of thechartDatesrecord component.Returns the value of thechartSeriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.matrix()Returns the value of thematrixrecord component.metrics()Returns the value of themetricsrecord component.Returns the value of theprojectionrecord component.Returns the value of theseriesByGrouprecord component.Returns the value of thestageBreakdownrecord component.stages()Returns the value of thestagesrecord component.Returns the value of thestaleItemsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalCountrecord component.withMatrix(List<ResponseCoverageCell> matrix) Returns a copy of this view withmatrix()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 fromLifecycleRecords.
-
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 aTrackerViewwith no group-partitioned series and no coverage matrix - equivalent to the canonical constructor withMap.of()andList.of()for those two fields.- Parameters:
id- the tracker's registered idstages- the tracker's canonical stage names, in ordermetrics- oneMetricCardViewper stage, instagesordertotalCount- number of currently-active (non-removed) items in this trackerprojection- the completion projection, when at least 7 days of history is availablechartDates- the dates plotted on this tracker's chart, ascendingchartSeries- cumulative reached-count per stage, aligned index-for-index withchartDatesstaleItems- active items that have not reached the final stage and have seen no recent activitystageBreakdown- number of active items whose furthest reached stage is each stagebreakdownByDate-stageBreakdown, recomputed as of each date inchartDates
-
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 aTrackerViewrecord class.- Parameters:
id- the value for theidrecord componentstages- the value for thestagesrecord componentmetrics- the value for themetricsrecord componenttotalCount- the value for thetotalCountrecord componentprojection- the value for theprojectionrecord componentchartDates- the value for thechartDatesrecord componentchartSeries- the value for thechartSeriesrecord componentstaleItems- the value for thestaleItemsrecord componentstageBreakdown- the value for thestageBreakdownrecord componentbreakdownByDate- the value for thebreakdownByDaterecord componentseriesByGroup- the value for theseriesByGrouprecord componentmatrix- the value for thematrixrecord component
-
-
Method Details
-
withMatrix
Returns a copy of this view withmatrix()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 fromLifecycleRecords.- Parameters:
matrix- the coverage matrix to attach- Returns:
- a copy of this view with
matrixreplaced
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
stages
Returns the value of thestagesrecord component.- Returns:
- the value of the
stagesrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-
totalCount
public int totalCount()Returns the value of thetotalCountrecord component.- Returns:
- the value of the
totalCountrecord component
-
projection
Returns the value of theprojectionrecord component.- Returns:
- the value of the
projectionrecord component
-
chartDates
Returns the value of thechartDatesrecord component.- Returns:
- the value of the
chartDatesrecord component
-
chartSeries
Returns the value of thechartSeriesrecord component.- Returns:
- the value of the
chartSeriesrecord component
-
staleItems
Returns the value of thestaleItemsrecord component.- Returns:
- the value of the
staleItemsrecord component
-
stageBreakdown
Returns the value of thestageBreakdownrecord component.- Returns:
- the value of the
stageBreakdownrecord component
-
breakdownByDate
Returns the value of thebreakdownByDaterecord component.- Returns:
- the value of the
breakdownByDaterecord component
-
seriesByGroup
Returns the value of theseriesByGrouprecord component.- Returns:
- the value of the
seriesByGrouprecord component
-
matrix
Returns the value of thematrixrecord component.- Returns:
- the value of the
matrixrecord component
-