title: Google Guava "zip" two lists
body: <p>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?</p>
  
  <p>Example:</p>
  
  <pre><code>public class Person {
      public final String name;
      public final int age;
  
      public Person(String name, int age) {
          this.name = name;
          this.age = age;
      }
  
      public String toString() {
          return "(" + name + ", " + age + ")";
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>List&lt;String&gt; names = Lists.newArrayList("Alice", "Bob", "Charles");
  List&lt;Integer&gt; ages = Lists.newArrayList(42, 27, 31);
  
  List&lt;Person&gt; persons =
      transform with a function that converts (String, Integer) to Person
  System.out.println(persons);
  </code></pre>
  
  <p>Would output:</p>
  
  <pre><code>[(Alice, 42), (Bob, 27), (Charles, 31)]
  </code></pre>