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

8254275: [valhalla/jep390] Revise "value-based class" & apply to wrappers #222

wants to merge 11 commits into from
@@ -37,8 +37,8 @@ <h1 id="ValueBased">{@index "Value-based Classes"}</h1>
<li>the class declares only final instance fields (though these may contain references
to mutable objects);</li>
<li>the class declares implementations of <code>equals</code>,
<code>hashCode</code>, and <code>toString</code> which are computed
<li>the class overrides the default implementations of <code>equals</code>,
<code>hashCode</code>, and <code>toString</code>, computing their results
solely from the values of the class's instance fields (and the members of
the objects they reference), not from the instance's identity;</li>
<li>the class's methods treat instances as <em>freely substitutable</em>