public int getNumBins() {
    return bins == null ? 0 : bins.size();
  }
In preparation for a Hive merge() call, serializes the current histogram object into an
ArrayList of DoubleWritable objects. This list is deserialized and merged by the
merge method.

@return An ArrayList of Hadoop DoubleWritable objects that represents the current
histogram.
@see #merge
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumericHistogram.java