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

Alex Herbert commented on COLLECTIONS-728:
------------------------------------------

{quote}your second match is incorrect. Match is (this & that = this)
{quote}
OK. I was thinking that this.match(that) == big.match(small). So do you propose 
to have effectively the following:
{code:java}
// a bloom filter with fewer bits can match a filter with more but not visa 
versa. 
public boolean match(BloomFilter other) {
    return (this & other) == this;
}

// a bloom filter with more bits can contain a filter with less but not visa 
versa. 
public boolean contains(BloomFilter other) {
    return (this & other) == other;
}
{code}

This does seem redundant. I would favour dropping one; I'd keep contains() as 
this is more self documenting.

> 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