--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/project-lombok?hl=en
> Possibly the best solution is having a common superclass for all your
> entities and have that implement the equals and hashcode the way you
> want.
> Then you can use @EqualsAndHashCode(callsuper=true, of="")
... or, better, a @Delegate.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio...@tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it
Also, what's the benefit? Saving a few CPU cycles in comparing the other fields?
On 12 March 2012 10:41, eric.giese <eric...@googlemail.com> wrote:
Such an implementation is handmade and, I guess, breaks the contract
of equals and hashcode.
If you are doing such a thing, then it would not be a good Idea to use
a tool like lombok to generate this code, as it is a custom
implementation which needs attention, and not generic java-typical
boilerplate.
--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/
To post to this group, send email to project-lombok@googlegroups.com
To unsubscribe from this group, send email to
--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
> @Delegate won't work, because all j.l.Object methods are never delegated
> (otherwise, delegating also means you get that object's toString() and
> such, bad idea). Unfortunately, that means that even if you WANT to
> delegate some of j.l.Object's own, you can't.
You caught me.