Java tutorial
//package com.java2s; import java.util.Collection; import java.util.HashSet; import java.util.concurrent.atomic.AtomicInteger; public class Main { private static final Collection<Number> atomicCounterList = new HashSet<Number>(); public static AtomicInteger newAtomicInteger() { AtomicInteger i = new AtomicInteger(); atomicCounterList.add(i); return i; } }