commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Heuer <>
Subject Re: [collections] [proposal] Bag interface change
Date Mon, 29 Dec 2003 20:58:26 GMT

Stephen Colebourne wrote:

> I am proposing to change the Bag interface.
> Add:
> equals(Object) - Two Bags are equal if they contain the same number of
> occurrences of all the same elements.
> hashCode() - The hashCode is defined as the sum total of each elements
> hashcode, where the hashcode for an element is defined as (e==null   ? 0 :
> e.hashCode()) ^ noOccurances)
> This will enable Bags to be compared.

I'm seeing a problem related to this change with an unit test for a class
that extends AbstractBagDecorator, but this failure doesn't show up in the
[collections] unit tests.

Will investigate further.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message