title: Java8: Stream map two properties in the same stream
body: <p>I have a class <code>Model</code> with the following signature:</p>
  
  <pre><code>class Model {
          private String stringA;
          private String stringB;
  
          public Model(String stringA, String stringB) {
              this.stringA = stringA;
              this.stringB = stringB;
          }
  
          public String getStringA() {
              return stringA;
          }
  
          public String getStringB() {
              return stringB;
          }
  }
  </code></pre>
  
  <p>I would like to map a <code>List&lt;Model&gt;</code> to a <code>List&lt;String&gt;</code> containing both stringA and stringB in a single stream</p>
  
  <pre><code>List&lt;String&gt; strings = models.stream()
                  .mapFirst(Model::getStringA)
                  .thenMap(Model::getStringB)
                  .collect(Collectors.toList());
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>List&lt;String&gt; strings = models.stream()
                  .map(Mapping.and(Model::getStringA,Model::getStringB))
                  .collect(Collectors.toList());
  </code></pre>
  
  <p>Of course none of them compiles, but you get the idea.</p>
  
  <p>Is it somehow possible?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Example:</p>
  
  <pre><code>Model ab = new Model("A","B");
  Model cd = new Model("C","D");
  List&lt;String&gt; stringsFromModels = {"A","B","C","D"};
  </code></pre>