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

Closed
wants to merge 11 commits into from
@@ -37,10 +37,10 @@ <h1 id="ValueBased">{@index "Value-based Classes"}</h1>
<ul>
<li>the class declares only final instance fields (though these may contain references
to mutable objects);</li>
<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 implementations of <code>equals</code>, <code>hashCode</code>,
and <code>toString</code> compute 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>
when equal, meaning that interchanging any two instances <code>x</code> and
<code>y</code> that are equal according to <code>equals()</code> produces no