Code example for AtomicLong

0
 * @author Jennifer Hickey 
 * 
 */ 
public class DoubleAsStringObjectFactory implements ObjectFactory<String> {
 
	private AtomicLong counter = new AtomicLong();
 
	public String instance() {
		return String.valueOf(Double.valueOf(counter.getAndIncrement()));
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE