Skip to content

Implement hashCode/equals/toString methods in type classes #101

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

Open
don-vip opened this issue Jan 11, 2022 · 1 comment
Open

Implement hashCode/equals/toString methods in type classes #101

don-vip opened this issue Jan 11, 2022 · 1 comment
Labels
Category: Enhancement New feature or request
Milestone

Comments

@don-vip
Copy link

don-vip commented Jan 11, 2022

Classes in co.elastic.clients.elasticsearch._types do not implement the hashCode/equals/toString methods

This would be particularly useful for debugging or in unit tests, could the generator be improved to generate these methods?

@swallez
Copy link
Member

swallez commented Jan 11, 2022

Thanks for the suggestions @don-vip!

toString has already been mentioned in #97 and indeed is a useful addition. We'll add it in a future version by serializing the type to JSON rendered in a string.

hashCode and equals are different beasts though, as they require additional code in every class. They may come in a later release.

@swallez swallez added the Category: Enhancement New feature or request label Jan 11, 2022
@swallez swallez added this to the v7.17.0 milestone Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants