Code example for AtomicLong

0
 * @author dmitry.buzdin 
 */ 
public class StatisticEntry { 
 
  private final Object key;
  private final AtomicLong value = new AtomicLong();
 
  public StatisticEntry(Object key) {
    this.key = key;
  } 
 
  public Object getKey() {
    return key;
  } 
 
  public long getValue() { 
    return value.get();
  } 
 
  public void increment(long value) {
    this.value.addAndGet(value);