Google Guava “zip” two lists

前端 未结 6 2024
萌比男神i
萌比男神i 2020-12-03 13:34

Using Google Guava (Google Commons), is there a way to merge two equally sized lists into one list, with the new list containing composite objects of the two input lists?

6条回答
  •  隐瞒了意图╮
    2020-12-03 14:03

    Looks like this is not currently in Guava, but is a desired feature. See this github issue, in particular Iterators.zip().

提交回复
热议问题