title: Dynamic AND conditions in an if statement
body: <p>I have an input String that contains a couple of search terms to find a line in a text including all of the search terms.</p>
  
  <p>For example: </p>
  
  <pre><code>String searchTerms = "java stackoverflow conditions";
  String [] splittedTerm = searchTerms.split(" ");
  </code></pre>
  
  <p>The search terms are AND connective:</p>
  
  <pre><code>if (textLine.contains(splittedTerm[0] &amp;&amp; textLine.contains(splittedTerm[1]) &amp;&amp; textLine.contains(splittedTerm[2])) start=true;
  </code></pre>
  
  <p>But the number of search terms is dynamic, it alwayse depends on the users request...</p>
  
  <p>So is there any possibility to use the if statement depending on the number of search terms?</p>