class CommunityHistogram {

    public static Histogram buildFrom(LongLongMap communitySizeMap) {
        final Histogram histogram = new Histogram(2);

        for (LongLongCursor cursor : communitySizeMap) {
            histogram.recordValue(cursor.value);
        }

        return histogram;
    }

}