Class Work.Progress

  • All Implemented Interfaces:
    Serializable
    Enclosing interface:
    Work

    public static class Work.Progress
    extends Object
    implements Serializable
    A progress report about a work instance.

    Progress can be expressed as a percentage, or with a current and total count.

    • 26.2% (percent not indeterminate)
    • 12/345 (current not indeterminate)
    • ?/345 (percent and current indeterminate but total non-zero)
    • ? (percent and current indeterminate and total zero)
    Since:
    5.6
    See Also:
    Serialized Form
    • Field Detail

      • PROGRESS_INDETERMINATE

        public static final Work.Progress PROGRESS_INDETERMINATE
      • PROGRESS_100_PC

        public static final Work.Progress PROGRESS_100_PC
      • percent

        protected final float percent
      • current

        protected final long current
      • total

        protected final long total
    • Constructor Detail

      • Progress

        public Progress​(float percent)
        Constructs a Work.Progress as a percentage.
        Parameters:
        percent - the percentage, a float between 0 and 100, or PERCENT_INDETERMINATE
      • Progress

        public Progress​(long current,
                        long total)
        Constructs a Work.Progress as a current and total count.
        Parameters:
        current - the current count or CURRENT_INDETERMINATE
        total - the total count
    • Method Detail

      • getPercent

        public float getPercent()
      • getCurrent

        public long getCurrent()
      • getTotal

        public long getTotal()
      • getIsWithPercent

        public boolean getIsWithPercent()
      • getIsWithCurrentAndTotal

        public boolean getIsWithCurrentAndTotal()
      • getIsIndeterminate

        public boolean getIsIndeterminate()