Package elki.logging.progress
Class ProgressTracker
- java.lang.Object
-
- elki.logging.progress.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()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProgress(Progress p)
Add a new Progress to the tracker.java.util.Collection<Progress>
getProgresses()
Get a list of progresses tracked.java.util.Collection<Progress>
removeCompleted()
Remove completed progresses.
-
-
-
Field Detail
-
progresses
private java.util.ArrayList<java.lang.ref.WeakReference<Progress>> progresses
Set of potentially active progresses.
-
-
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.
-
-