commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Pfau" <>
Subject RE: [lang] EqualsBuilder: Comparison of Collections
Date Tue, 31 Jan 2006 18:33:04 GMT

> Stephen Colebourne:
> This is a misunderstanding of the java collections framework.
> The framework consists of three collections interfaces - 
> Collection, Set and List.
> Two List implementations are equal based on their order.
> Two Set implementations are equal based on their content.
> Two Collection implementations have no defined equals behaviour.
> If you want to achieve equals comparison based on content 
> without order, then simply create two HashSet objects instead 
> of two ArrayList objects.

Thank you for welcoming and correcting me on this Stephen, you are
absolutely right! You proposed to use a HashSet in order to compare
Collections for equality based on their content. However, in the current
State of the EqualsBuilder, it is not possible to use it in order to compare

So wouldn't it be useful to add such an operation?

Kind Regards,

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

View raw message