Interface ProgressionTracker

All Known Implementing Classes:
AbstractProgressionTracker, ContainerProgressionTracker, SimpleProgressionTracker

public sealed interface ProgressionTracker permits AbstractProgressionTracker
Track a progression
  • 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 simply getIndex() / 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