Code example for AtomicLong

Methods: addAndGet

0
  public long getValue() { 
    return value.get();
  } 
 
  public void increment(long value) {
    this.value.addAndGet(value);
  } 
 
  @Override 
  public boolean equals(Object object) {
    if ((this == object)) {
      return true; 
    } 
    if (!(object instanceof StatisticEntry)) {
      return false; 
    } 
    StatisticEntry entry = (StatisticEntry) object;
    return new EqualsBuilder().append(this.getKey(), entry.getKey()).isEquals();
  }