public synchronized Collection < Progress > getProgresses ( ) { List < Progress > list = new ArrayList <> ( progresses . size ( ) ) ; Iterator < WeakReference < Progress > > iter = progresses . iterator ( ) ; while ( iter . hasNext ( ) ) { WeakReference < Progress > ref = iter . next ( ) ; if ( ref . get ( ) == null ) { iter . remove ( ) ; } else { list . add ( ref . get ( ) ) ; } } return list ; }
Get a list of progresses tracked .