Description

Stage is a stage in the app's lifecycle. The values are ordered, so that a lifecycle change from stage From to stage To implicitly crosses every stage in the range (min, max], exclusive on the low end and inclusive on the high end, where min is the minimum of From and To, and max is the maximum.

The documentation for individual stages talk about positive and negative crosses. A positive lifecycle change is one where its From stage is less than its To stage. Similarly, a negative lifecycle change is one where From is greater than To. Thus, a positive lifecycle change crosses every stage in the range (From, To] in increasing order, and a negative lifecycle change crosses every stage in the range (To, From] in decreasing order.