Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement LinkedMap class #124
base: main
Are you sure you want to change the base?
Implement LinkedMap class #124
Changes from 2 commits
5364b7f
cddce6e
5182182
9e1ac71
d492faf
3b4313c
a9bcc39
aabd161
35618e9
1dbe37c
c77b139
4552e09
6a4f781
b2eb5de
e4b650a
94c00b0
87fdd2b
5c864aa
af8c112
7a0086a
186ac0a
35ebb6a
6eff3dd
e1ce639
8e9f888
ef8b178
31d1c3c
6d57339
8d9bbbe
7e2e11a
0ea9981
3ab1dfa
fe5a78f
4f0eeb6
6eab7be
31c9732
d92fa66
af988fe
bf9165c
893aa85
312d33c
f5759be
85fb829
e2a3f9f
a0da632
d43ae77
2f7cc3b
145147d
16c989f
cd77621
702c6ef
d4efec9
f9a0b89
d72f58c
0115e83
d2a3fb8
61f5d4a
2dd22d6
a92f83a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning
Code scanning / PMD
Missing ApexDoc comment Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeRabbit
The
put
method currently allows for duplicate values to be added to the list of values for a given key set. If this is not the intended behavior and you want to prevent duplicates, consider using aSet<Object>
instead of aList<Object>
. However, if maintaining the order of insertion is important, then the current implementation is fine.Check warning
Code scanning / PMD
Missing ApexDoc comment Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeRabbit
The
get
method returns null when the keys are not found in the map. It would be better to return an empty list instead to avoid potential NullPointerExceptions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a thing.
Want to put a null-safe operator @codefriar ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Wrote Changes
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeRabbit
Similar to the
get
method, theremove
method also returns null when the keys are not found in the map. Consider returning an empty list instead.Check warning
Code scanning / PMD
Missing ApexDoc comment Warning
Check warning
Code scanning / PMD
Missing ApexDoc comment Warning
Check warning
Code scanning / PMD
Missing ApexDoc comment Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeRabbit
In the
values()
method, you are returning the original list of values from the map. This could potentially allow outside code to modify the internal state of yourLinkedMap
object. To prevent this, consider returning a deep copy of the values.Check warning
Code scanning / PMD
Missing ApexDoc comment Warning