Skip to content

Conversation

@ColmBhandal
Copy link
Owner

Description

Refactored the MultiValueMap to something more abstract. Renamed the types to be less ambiguous. Added a list-valued map.

As an aside, removed the getHashCode() function and replaced with equals with a DictEquals function.

C# already has a library with a ListDictionary in it which means something else
So to disambiguate, the names of these collection-valued dicts include the term "Valued" indicating that it's the values at each key that is a collection
The C# underlying dictionary will throw this anyway, but no harm pushing the error up a level in the stack trace
This function allows a user to insert an element to a given index in the list at the given key
One test case is where there is already a non-mepty list mapped from the given key
Another test case is where there is no list mapped to the given key- confirming that insert creates one
PR number on each line relating to this PR
Added a line about list-valued dictionaries
@ColmBhandal ColmBhandal changed the base branch from master to develop June 29, 2020 14:21
Renamed API function
Added TransformValues to list valued dictionary
Added list valued dictionary test case

Signed-off-by: cbhandal <bhandalc@gmail.com>
hctrdev
hctrdev previously approved these changes Jun 30, 2020
@ColmBhandal ColmBhandal merged commit 2cfcf55 into develop Jun 30, 2020
@ColmBhandal ColmBhandal deleted the feature/list-map branch June 30, 2020 09:18
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.

ListMap Remove HashCode & Replace Equals Override from MultiValueMap

3 participants