Timeline for Is there a way to handle nested Collections more elegantly?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 6, 2015 at 21:02 | comment | added | G. Bach |
Because of the contract of equals , this will only work if the keys form an equivalence relation. I recently encountered a situation like this where they didn't: the third component of the key could either be a default value that would accept any instance, or some concrete value, with all concrete values being different from each other. Thus any concrete value would have to be considered equal to the default one, and by transitivity they would all have to be equal to each other, which they weren't.
|
|
Aug 20, 2012 at 18:41 | vote | accept | ovdsrn | ||
Jan 14, 2012 at 10:37 | comment | added | Martijn Verburg | I'll also add, name the Triple class something meaningful in your business domain. It must mean something :-) | |
Jan 13, 2012 at 16:19 | history | migrated | from stackoverflow.com (revisions) | ||
Jan 13, 2012 at 15:34 | comment | added | ovdsrn | Correct, this is what I'm trying to map: (A, B, Integer) to C. | |
Jan 13, 2012 at 15:30 | comment | added | amit |
Will the downvoter explain? I assumed here the OP actually is trying to map : (A,B,Integer) -> C , and thus the nested Map usage. The edit also supports my preception.
|
|
Jan 13, 2012 at 15:23 | history | answered | amit | CC BY-SA 3.0 |