Skip to content

Clarify equality and hash-code behavior for map values - #118

Merged
gmatossian merged 1 commit into
mainfrom
117-clarify-equality-hash-code-behavior
Oct 22, 2026
Merged

gmatossian merged 1 commit into
mainfrom
117-clarify-equality-hash-code-behavior

Conversation

@gmatossian

Copy link
Copy Markdown
Owner

The equality and hash-code topic could make readers apply the key/set-element mutation rule to ordinary map values. This change puts the three positions side by side and shows that replacing a value under a stable key needs no remove-first step.

What changed

  • Add a compact comparison of HashSet elements, HashMap keys, and HashMap values.
  • Highlight the safe mutation rule for hash-based keys and set elements.
  • Add a short Java value-replacement example and authoritative Java 21 references.
  • Preserve the existing equality/hash contract and sorted-collection guidance.

Verification

  • npm run check — passed (176 unit/tool tests and 38 browser tests).
  • git diff --check — passed.
  • Oracle Map and Set reference links — HTTP 200.
  • Rendered topic reviewed at desktop and 390 px narrow width.

Review

  • Deliberate scoped final-diff review completed before push; no blocking findings.
  • Independent review omitted as disproportionate for this bounded documentation-only change.
  • Codex drafted the content change and performed the delegated verification and GitHub workflow; Gabriel reviewed and accepted the rendered direction.

Closes #117

@gmatossian
gmatossian merged commit d7a8ba3 into main Oct 22, 2026
1 check passed
@gmatossian
gmatossian deleted the 117-clarify-equality-hash-code-behavior branch October 22, 2026 17:06
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

Successfully merging this pull request may close these issues.

Clarify equality and hash-code behavior for map keys, values, and set elements

1 participant