addthis/stream-lib — pull request #82 by tea-dragon (2014-09-11 16:31:27+00:00)
Title: Fixes #81 HyperLogLog.Builder improvements

We cannot make the constructors for the Builder match HyperLogLog
without risking behavior changes downstream, but we also have no
default constructor for either (and adding one could be contentious).

Therefore I have added static 'with' methods. This somewhat goes
against the expected builder pattern, but it's not as though
HyperLogLog.Builder was really following it anyway (there is only
one setting so it is closer to just being a supplier).

Additionally, it would have been a little silly to also implement
non-static 'with' methods since the code would look exactly the
same for both.

Lastly, the builder now performs eager validation of rsd/log2m.
This leads to extra validation calls, but I can live with that.