Code example for AtomicLong

0
 * @author Jennifer Hickey 
 * 
 */ 
public class DoubleObjectFactory implements ObjectFactory<Double> {
 
	private AtomicLong counter = new AtomicLong();
 
	public Double instance() {
		return Double.valueOf(counter.getAndIncrement());
	} 
 
}