public long sum(){
  long sum=0L;
  for (  AtomicLong value : map.values()) {
    sum=sum + value.get();
  }
  return sum;
}

public long sum ( ) { long sum = 0L ; for ( AtomicLong value : map . values ( ) ) { sum = sum + value . get ( ) ; } return sum ; }
returns the sum of all values in this map . < p / > < p > this method is not atomic : the sum may or may not include other concurrent operations .
