[ 
https://issues.apache.org/jira/browse/COLLECTIONS-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16990552#comment-16990552
 ] 

Gilles Sadowski commented on COLLECTIONS-728:
---------------------------------------------

About mutability:
 * Couldn't {{shape}} be _final_ in {{BloomFilter}}?
 * Does {{HasherBloomFilter}} really gain anything from being mutable? IOW, 
what would be lost if the {{merge}} operation would return a new instance?
 * In class\{{MD5}}, why not make the fields _final_? Even though the instance 
is not immutable, it simplifies testing and reasoning about the code. Ditto for 
other similar classes.
 * In class {{BitSetBloomFilter}}, can't {{bitSet}} be _final_? Can't {{merge}} 
create a new instance? A lot of methods do indeed {{clone}} that instance field 
in order to compute a result.

About interface {{HashFunction}}:
 * It is weird (IMHO) to have an interface with such a name where the API just 
contains a {{getName()}} method.
 * I reiterate my suggestion of using an enum. Did you have a look at 
{{RandomSource}} in "Commons RNG"?

About class {{MD5}}:
 * It is awkard that users have to guard against a checked exception because of 
an *internal* error.

> BloomFilter contribution
> ------------------------
>
>                 Key: COLLECTIONS-728
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-728
>             Project: Commons Collections
>          Issue Type: Task
>            Reporter: Claude Warren
>            Priority: Minor
>         Attachments: BF_Func.md, BloomFilter.java, BloomFilterI2.java, 
> Usage.md
>
>
> Contribution of BloomFilter library comprising base implementation and gated 
> collections.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to