Code example for AtomicLong

Methods: getAndIncrement

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