Skip to content

Refactor HashTableOpenAddressingBase: consolidate API and enhance docs#1317

Merged
williamfiset merged 1 commit intomasterfrom
refactor/hashtable-open-addressing
Apr 3, 2026
Merged

Refactor HashTableOpenAddressingBase: consolidate API and enhance docs#1317
williamfiset merged 1 commit intomasterfrom
refactor/hashtable-open-addressing

Conversation

@williamfiset
Copy link
Copy Markdown
Owner

Summary

  • Remove insert/hasKey/add method aliases — callers now use put and containsKey directly
  • Add ConcurrentModificationException check in iterator's next() and remove redundant remove() override
  • Expand class-level Javadoc explaining open addressing, tombstone semantics, and lazy relocation
  • Enhance inline educational commentary throughout probe loops (tombstone reuse, lazy deletion, resize behavior)
  • Update all three test classes to use the consolidated API (put/containsKey)

Test plan

  • All 4 hash table tests pass (bazel test //src/test/java/.../hashtable/...)

🤖 Generated with Claude Code

Remove insert/hasKey/add aliases in favor of put/containsKey directly,
add ConcurrentModificationException check in iterator's next(), remove
redundant iterator remove(), and expand class-level and inline
educational commentary explaining open addressing, tombstones, probe
chains, and lazy relocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@williamfiset williamfiset merged commit 4371d09 into master Apr 3, 2026
2 checks passed
@williamfiset williamfiset deleted the refactor/hashtable-open-addressing branch April 3, 2026 22:42
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.

1 participant