code: @SuppressWarnings("unchecked")
    @Override
    public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)
    {
      Object metric = e.get(fieldName);
      I finalMetric;
      if (a.containsKey(fieldName)) {
        AggregatorFactory af = a.get(fieldName);
        finalMetric = metric != null ? (I) af.finalizeComputation(metric) : null;
      } else {
        finalMetric = (I) metric;
      }
      buckets[index++] = finalMetric;
      index %= numBuckets;
    }
docs: /* (non-Javadoc)
  @see Averager#addElement(java.util.Map, java.util.Map)