You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RichIterable currently has groupBy / groupByEach but only has groupByUniqueKey without the corresponding groupByEachUniqueKey. The method groupByEachUniqueKey would index an item in a Map using multiple keys. Each key will only point to one value. An example of this might be mapping a Person to his/her aliases.
I ran into this problem recently trying to group an Object that contains a distinct range of numbers by each of the distinct numbers. I was able to accomplish this by using a nested injectInto, but it is somewhat awkward and may be difficult to comprehend. In my particular case, it is more optimal using injectInto as I am grouping into an IntObjectMap.
The text was updated successfully, but these errors were encountered:
RichIterable currently has
groupBy
/groupByEach
but only hasgroupByUniqueKey
without the correspondinggroupByEachUniqueKey
. The methodgroupByEachUniqueKey
would index an item in aMap
using multiple keys. Each key will only point to one value. An example of this might be mapping a Person to his/her aliases.I ran into this problem recently trying to group an Object that contains a distinct range of numbers by each of the distinct numbers. I was able to accomplish this by using a nested
injectInto
, but it is somewhat awkward and may be difficult to comprehend. In my particular case, it is more optimal usinginjectInto
as I am grouping into anIntObjectMap
.The text was updated successfully, but these errors were encountered: