Bug 127861 [DataBinding] Mark API provisional
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java
/**
	 * Average number of elements to add or remove
	 */ 
	private static final int AVERAGE_DELTA = 4;
	
	/** 
	 * Average "computation" time -- time taken to do the simulated work (ms)
	 */ 
	private static final int AVERAGE_BUSY_TIME = 1000;
	
	/**
	 * List of all undisposed AsynchronousTestSet instances. Used for the recomputeAll method.
	 */
	private static List allSets = new ArrayList();
	
	public AsynchronousTestSet() {
		display = Display.getCurrent();
		if (display == null) {
			throw new IllegalStateException("This object can only be created in the UI thread");
		}
		recompute();
	}
	
	protected Collection computeElements() {
		return elements;
	}
	
	protected void firstListenerAdded() {
		super.firstListenerAdded();
		allSets.add(this);