Code example for AtomicInteger

 * @author Derek Smith 
public class NamedThreadFactory implements ThreadFactory
    protected final String id;    
    protected final AtomicInteger n = new AtomicInteger(1);
     * Creates a new ThreadFactory with a value that can be used 
     * to retrieve itself later. 
     * @param id The name of the the thread factory; 
    public NamedThreadFactory(String id)
    	super(); = id;
    /* (non-Javadoc) 
Stop searching for code, let great code find you!  Add Codota to your java IDE