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

expand equals section to explain value classes and difference in Float,Double #16

Open
SauravDas90 opened this issue Jun 5, 2019 · 1 comment

Comments

@SauravDas90
Copy link

For primitive fields whose type is not float or double, use the == operator for
comparisons; for object reference fields, invoke the equals method recursively;
for float fields, use the Float.compare method; and for double fields, use
Double.compare. The special treatment of float and double fields is made
necessary by the existence of Float.NaN, -0.0f and the analogous double
constants; see the Float.equals documentation for details. For array fields,
apply these guidelines to each element. If every element in an array field is significant,
you can use one of the Arrays.equals methods added in release 1.5.

@HugoMatilla
Copy link
Owner

Can you make a PR for this?

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

No branches or pull requests

2 participants