Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relaxed equality #9

Closed
GoogleCodeExporter opened this issue Mar 29, 2015 · 1 comment
Closed

Relaxed equality #9

GoogleCodeExporter opened this issue Mar 29, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Sometimes, classes allow relaxed equality rules, instead of a
field-by-field comparison. For example:

class And extends Expression {
  private final Expression left;
  private final Expression right;
  ...
}

For this class, it would be reasonable for equals to return true when left
and right are switched but are otherwise equal.

You would want to be able to supply a collection of instances that are
equal to each other. Because EqualsVerifier might automatically create new
objects that are equal to one of these supplied instances, it would be
necessary for the client to explicitly supply a collection of "unequal"
instances as well.

Original issue reported on code.google.com by [email protected] on 29 Aug 2009 at 4:57

@GoogleCodeExporter
Copy link
Author

Done; see EqualsVerifier#forRelaxedEqualExamples(Object, Object, Object...)

Original comment by [email protected] on 29 Aug 2009 at 7:21

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant