Record Class LifecycleRecord
- Record Components:
id- stable identifier for this item, unique within its trackerlabel- human-readable display namegroup- optional grouping label (e.g. the enclosing feature or declaring class), ornullwhen the source has no grouping conceptstageReachedAt- ordered map of stage name to the instant the item first reached that stagelastSeenAt- when the item was last observed present, ornullif never observedremovedAt- when the item was first observed missing, ornullwhile still present
TrackerSource.
stageReachedAt is ordered by the tracker's canonical stage sequence (e.g.
listed, defined, implemented) and only contains entries for stages the
item has actually reached; a stage never (yet) reached is simply absent from the map rather than
mapped to null.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.booleanhasReached(String stage) Whether this item has reachedstage.id()Returns the value of theidrecord component.label()Returns the value of thelabelrecord component.Returns the value of thelastSeenAtrecord component.latestStage(List<String> canonicalStages) The furthest stage this item has reached, percanonicalStages' own order.Returns the value of theremovedAtrecord component.Returns the value of thestageReachedAtrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
hasReached
Whether this item has reachedstage.- Parameters:
stage- the stage name to check- Returns:
trueifstageReachedAtcontainsstage
-
latestStage
The furthest stage this item has reached, percanonicalStages' own order.Not simply "the highest-index key present in
stageReachedAt()", since someTrackerSources stamp only the single stage matching an item's current status rather than backfilling every earlier stage it must logically have passed through - the Gherkin scenario source, for one, never gains adefinedentry for a scenario first observed alreadyimplemented. This walkscanonicalStagesfrom the end instead, so it always reports the furthest reached stage regardless of which earlier ones were skipped.- Parameters:
canonicalStages- the tracker's canonical stage names, in order- Returns:
- the furthest reached stage, or empty if none of
canonicalStageshas been reached
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
stageReachedAt
Returns the value of thestageReachedAtrecord component.- Returns:
- the value of the
stageReachedAtrecord component
-
lastSeenAt
Returns the value of thelastSeenAtrecord component.- Returns:
- the value of the
lastSeenAtrecord component
-
removedAt
Returns the value of theremovedAtrecord component.- Returns:
- the value of the
removedAtrecord component
-