title: How to join when using map with filter with stream
body: <p>I want to create a query if the <code>getData()</code> return <code>&quot;yes&quot;</code>. So added the filter for the same.</p>
  <p>Now if the value of <code>getData()</code> is <code>&quot;yes&quot;</code> then I want to concat the three parameter which I am getting from the object.</p>
  <p>Now for the list of object I want to join all the value which is coming from</p>
  <pre><code>(f -&gt; f.getF()+&quot; &quot;+f.getO()+&quot; &quot;+f.getV())
  </code></pre>
  <p>with &quot; and &quot; as delimiter but not able to figure it out.</p>
  <pre><code>String query = data.stream()
      .filter(f -&gt; f.getData().equalsIgnoreCase(&quot;yes&quot;))
      .map(f -&gt; f.getF()+&quot; &quot;+f.getO()+&quot; &quot;+f.getV())
      .collect(Collectors.joining(&quot; and&quot;,&quot;how to do this&quot; , suffix));
  </code></pre>
  <p>for example,
  we are getting data from that object as</p>
  <blockquote>
  <p>f.getF()--------&quot;column name&quot;</p>
  </blockquote>
  <blockquote>
  <p>f.getO()--------&quot;=&quot;</p>
  </blockquote>
  <blockquote>
  <p>f.getV()--------&quot;2&quot;</p>
  </blockquote>
  <p>so I want to add all the condition with and delimiter and produce a single String with all the conditions.</p>
  <p>I think I can append &quot;and&quot; in the  map() and later remove the last &quot;and&quot; from the string</p>
  <p>something like this</p>
  <blockquote>
  <p>columnname = 2 and columnnam1 &gt; 1 and column2 = 6</p>
  </blockquote>