Interface ProgressionTracker
- All Known Implementing Classes:
AbstractProgressionTracker,ContainerProgressionTracker,SimpleProgressionTracker
Track a progression
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the progression percentage, that can be simplygetIndex()/getSize()or a more complex algorithm when handling children progressionsgetId()Get the idlonggetIndex()Get the index of the current stepgetLabel()Get the labelGet the parent progression trackerlonggetSize()Get the sizetoJSON()Get the progression tracker as a JSON
-
Method Details
-
getLabel
Get the label- Returns:
- The label
-
getId
Get the id- Returns:
- The id
-
getIndex
long getIndex()Get the index of the current step- Returns:
- The index between [1 and size]
-
getSize
long getSize()Get the size- Returns:
- The size
-
asPercentage
double asPercentage()Get the progression percentage, that can be simplygetIndex()/getSize()or a more complex algorithm when handling children progressions- Returns:
- The progression (between 0 and 100)
-
toJSON
Get the progression tracker as a JSON- Returns:
- The progression tracker's JSON
-
getParent
Get the parent progression tracker- Returns:
- the parent or null
-