Bug 127861 [DataBinding] Mark API provisional
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/contentprovider/test/AsynchronousTestSet.java
package org.eclipse.jface.examples.databinding.contentprovider.test;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.Set;
import org.eclipse.jface.databinding.AbstractUpdatableSet;
import org.eclipse.jface.internal.databinding.swt.SWTUtil;
import org.eclipse.swt.widgets.Display;
/**
 * Test set that simulates asynchronously computed elements. The elements
 * of the set are randomly generated Integers. Whenever
 * the "recompute" method is called, the set will spin off a job that
 * sleeps for a period of time and then randomly adds and removes elements
 * from the set.
 * 
 * <p>
 * This simulates a set that wraps a database query or network communication. 
 * These would follow the same pattern (report the set as "stale", perform some
 * slow operation, then make changes to the set).
 * </p>
 * 
 * @since 3.2
 */
public class AsynchronousTestSet extends AbstractUpdatableSet {