Search in sources :

Example 1 with CopyOnWriteList

use of com.biglybt.core.util.CopyOnWriteList in project BiglyBT by BiglySoftware.

the class ProgressReporter method addListener.

/* (non-Javadoc)
	 * @see com.biglybt.ui.swt.mainwindow.IProgressReporter#addListener(com.biglybt.ui.swt.mainwindow.IProgressReporterListener)
	 */
@Override
public void addListener(IProgressReporterListener listener) {
    if (shouldIgnore()) {
        return;
    }
    if (null != listener) {
        if (null == reporterListeners) {
            reporterListeners = new CopyOnWriteList();
            reporterListeners.add(listener);
        } else if (!reporterListeners.contains(listener)) {
            reporterListeners.add(listener);
        }
    }
}
Also used : CopyOnWriteList(com.biglybt.core.util.CopyOnWriteList)

Aggregations

CopyOnWriteList (com.biglybt.core.util.CopyOnWriteList)1