Package ca.cgjennings.algo
Interface MonitoredAlgorithm
-
- All Known Implementing Classes:
ProgressHelper
,TextIndexer
public interface MonitoredAlgorithm
AMonitoredAlgorithm
is an algorithm that can report on its progress as it completes. It supports a single listener (although that listener can chain to other listeners if needed) that will be notified as the algorithm progresses.- Author:
- Chris Jennings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProgressListener
setProgressListener(ProgressListener li)
Sets the progress listener that will listen for progress on this algorithm, replacing the existing listener (if any).
-
-
-
Method Detail
-
setProgressListener
ProgressListener setProgressListener(ProgressListener li)
Sets the progress listener that will listen for progress on this algorithm, replacing the existing listener (if any). A listener should only be set before the algorithm begins executing, not while it is already in progress.- Parameters:
li
- the listener to set (may benull
)- Returns:
- the previous listener, or
null
-
-