Class ProgressTracker


  • public class ProgressTracker
    extends java.lang.Object
    Class to keep track of "alive" progresses.
    Since:
    0.3
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<java.lang.ref.WeakReference<Progress>> progresses
      Set of potentially active progresses.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProgressTracker()  
    • Field Detail

      • progresses

        private java.util.ArrayList<java.lang.ref.WeakReference<Progress>> progresses
        Set of potentially active progresses.
    • Constructor Detail

      • ProgressTracker

        public ProgressTracker()
    • Method Detail

      • getProgresses

        public java.util.Collection<Progress> getProgresses()
        Get a list of progresses tracked.
        Returns:
        List of progresses.
      • addProgress

        public void addProgress​(Progress p)
        Add a new Progress to the tracker.
        Parameters:
        p - Progress
      • removeCompleted

        public java.util.Collection<Progress> removeCompleted()
        Remove completed progresses.
        Returns:
        List of progresses removed.