Update HashMap.java
Changes
SOLID Principles:
Single Responsibility Principle: Each class (HashMap, LinkedList, Entry) has a clear single responsibility. For example, the HashMap class manages the hash map, LinkedList handles linked list operations, and Entry represents a key-value pair. Open-Closed Principle: The code is designed to be open for extension (e.g., adding new methods) but closed for modification (existing methods are not changed). Reliable:
Improved code readability and maintainability by following SOLID principles and Java conventions. Added bounds checking to handle potential IndexOutOfBoundsException. Extensible:
The code is extensible, allowing for future additions of methods or features without modifying existing code. This is achieved by adhering to the Open-Closed Principle. Javadoc Comments:
Added Javadoc comments to provide comprehensive documentation for each class and method, enhancing code understanding and usability.
- [ ] I have read CONTRIBUTING.md.
- [ ] This pull request is all my own work -- I have not plagiarized it.
- [ ] All filenames are in PascalCase.
- [ ] All functions and variable names follow Java naming conventions.
- [ ] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
- [ ] All new code is formatted with
clang-format -i --style=file path/to/your/file.java
I request the maintainer(s) to merge my request using "hacktoberfest-accepted" label.
can you plss help me how to resolve that issue related to clang-format??
Hi @Jyotishmoy12 You can check the Clang format linter build logs and you can see some + and -, and if your build failed. That means you need to remove those '-' lines and add '+' lines with mentioned formatting.
Thanks a lot for your help!
On Tue, 10 Oct 2023, 6:35 pm D.Sunil, @.***> wrote:
Hi @Jyotishmoy12 https://github.com/Jyotishmoy12 You can check the Clang format linter build logs and you can see some + and -, and if your build failed. That means you need to remove those '-' lines and add '+' lines with mentioned formatting.
— Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/Java/pull/4746#issuecomment-1755392357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWHRKHPDKV65V22CXZXWYCDX6VB2RAVCNFSM6AAAAAA5YVX23KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVGM4TEMZVG4 . You are receiving this because you were mentioned.Message ID: @.***>
@siriak Please review this one as well.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!