Is there an acceptable Java equivalent for Python zip ()?

I have two List objects, and I want to link them, like the zip() function in Python. I'm sure this is not available in the JDK, but is there something similar in a fairly common library like Apache Commons Collections ? Thank.

+44
java collections
Jan 22 '10 at 16:59
source share
1 answer

Functional Java has zip , zipWith and zipIndex , as you would expect from Haskell or Scala. (Indeed, the authors are largely Haskell programmers.)

+21
Jan 22 '10 at 17:37
source share



All Articles