Closed cavarzan closed 8 years ago
From the autovalue documentation:
Custom implementations
Don't like the equals, hashCode or toString method AutoValue generates? You can underride it! Just write your own, directly in your abstract class; AutoValue will see this and skip generating its own.
Derived fields
If a field exists to cache a derived value, and should be ignored in equals, hashCode and toString, define it directly in your class instead of providing an abstract accessor for it. AutoValue will know nothing of it.
You may have fields you wish to ignore in equals for other reasons. We're sorry: AutoValue doesn't work for these cases, since there's no way to pass the extra parameter "through" the generated class constructor.
@LordRaydenMK thanks!
Hi! It is possible to ignore a field in equals / hascode validation? I didn't find any annotation or configuration for this case.