Oliver Heger wrote:
Sorry the commit was incomplete, this test assumes the configuration defines its equals() methods. I added an equals() method in AbstractConfiguration delegating to StrictConfigurationComparator.compare() but I'm not sure it's worth committing this. What do you think ? I'll fix the test if we rule out this suggestion.

Emmanuel Bourg

I am not too convinced about the value of an equals() method either. Comparing two Configuration objects does not seem to be such a common task. And if it is needed, the comparator class can be used directly. If there was an equals() method, how would you implement hashCode()?

hashCode() could be implemented as the sum of the hashCodes of the keys, or as the number of properties in the configuration.

Emmanuel Bourg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to