Maps.uniqueIndex() for Multimap?
We can use Maps.uniqueIndex()
to create a Map
out of any Iterable
w开发者_运维知识库hich is very handy. But I need to create a Multimap
and I'm having Iterable
, is there any nice way to create a Multimap
from Iterable
just like - Maps.uniqueIndex()
If it doesn't have any utility method then would like to see other guava approach to this.
I suspect you want Multimaps.index
.
精彩评论