public void removeAllZeros(){
  for (  K key : map.keySet()) {
    AtomicLong atomic=map.get(key);
    if (atomic != null && atomic.get() == 0L) {
      map.remove(key,atomic);
    }
  }
}

public void removeAllZeros ( ) { for ( K key : map . keySet ( ) ) { AtomicLong atomic = map . get ( key ) ; if ( atomic != null && atomic . get ( ) == 0L ) { map . remove ( key , atomic ) ; } } }
removes all mappings from this map whose values are zero . < p / > < p > this method is not atomic : the map may be visible in intermediate states , where some of the zero values have been removed and others have not .
