#7 QuotientTreeMap: multivalue

Closed
opened 6 years ago by msieron · 1 comments
msieron commented 6 years ago

MultiValue support is broken. Let's image, we put 4 values: List, List, ArrayList, ArrayList

Then we have no idea, what structure will be at the end. Possible options:

 - List
   - List/ArrayList
   - List/ArrayList
 - List
 - List
   - List/ArrayList
 - List
   - List/ArrayList

Anyway, every option is broken if we want to later use values sorted by inheritance.

In effect, if we want to map many values (we want in DynamicInvoker!) then we have to use explicitly QuotientTreeMap<Class, List<?>>. Additionaly, we can't use standard computeIfPresent, because get uses find, not findExact!

MultiValue support is broken. Let's image, we put 4 values: List, List, ArrayList, ArrayList Then we have no idea, what structure will be at the end. Possible options: ``` - List - List/ArrayList - List/ArrayList - List ``` ``` - List - List/ArrayList - List - List/ArrayList ``` Anyway, every option is broken if we want to later use values sorted by inheritance. In effect, if we want to map many values (we want in DynamicInvoker!) then we have to use explicitly `QuotientTreeMap<Class, List<?>>`. Additionaly, we can't use standard `computeIfPresent`, because `get` uses `find`, not `findExact`!
msieron commented 6 years ago
Collaborator

QuotientMap abstraction is broken in every way, and unusable in DynamicInvoker.

QuotientMap abstraction is broken in every way, and unusable in DynamicInvoker.
ranides referenced this issue from a commit 4 years ago
ranides referenced this issue from a commit 4 years ago
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.