title: How can I compare a List<String> against a String?
body: <p>I currently have this code:</p>
  <pre class="lang-java prettyprint-override"><code>    private boolean checkWildcardFilter(String contentStripped, GuildTransformer guild) {
          String words = contentStripped.toLowerCase();
          List &lt;String&gt; badWordsList = replace(guild.getBadWordsWildcard());
          System.out.println(&quot;UWords: &quot; + words);
          System.out.println(&quot;FWords: &quot; + badWordsList);
          
          return words.stream().anyMatch(badWordsList::equals);
      }
  </code></pre>
  <p>In the example <strong>apple</strong> and <strong>hi</strong> are supposed to be filtered</p>
  <p>What I want it to do, is check the sentence &quot;I will go and eat a grand<strong>apple</strong> with my new <strong>hi</strong>re.&quot;. It needs to find the words &quot;apple&quot; and &quot;hi&quot; no matter where is is in the sentence. If it finds it, it should filter</p>
  <p>It's in Java, and the words are coming from a database:<a href="https://i.stack.imgur.com/2BXlt.png" rel="nofollow noreferrer">database entry</a></p>
  <p>And it decodes to: (A few curse words)</p>
  <p><code>[&quot;***&quot;, &quot;***&quot;, &quot;***&quot;, &quot;***&quot;]</code></p>