Richard Wallace wrote: > I've been working on porting the JScience Amount class to be a > Composite. It's going well so far, but one thing that I really want to > do is to override the equals() and hashCode() methods. The Amount is an > immutable value object, so it makes sense for it to have these methods > implemented. But, because of the way Qi4j looks up the implementation > of methods, it always uses the Object.equals() and Object.hashCode() > method implementations. Do you think it would make sense to special > case the way these methods are determined in the > CompositeMethodsModel.invoke() method for these methods?
I think this goes back to defining how ValueComposites work, because Amount sounds like a Value, right? So for ValueComposites we would definitely have support for saying what fields/properties are used to deduce equality/hashCode. /Rickard _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

