title: Matching a list (of tags) with another and detecting presence of common elements
body: <p>My requirement is to match tags. In the example, this particular <code>HourConstraint</code>  checks the <code>TeacherHour</code> assigned to <code>Hour(23)</code>. </p>
  
  <p>Specifically,  it checks <code>TeacherHour.attributes["tags"]</code> for the values <code>["asst_ct","teacher_john_smith"]</code> and <strong>detects atleast one match</strong>, two in this case (both <code>"asst_ct"</code> and <code>"teacher_john_smith"</code>) .</p>
  
  <pre><code>TeacherHour:
    id: 47
    assigned_hour: Null
    attributes:Map&lt;List&lt;String&gt;&gt;
      "tags":["asst_ct","no_strenuous_duties","kinda_boring","teacher_john_smith"]
      "another_attribute":[...]
  
  HourConstraint:
     hour: Hour(23)
     attribute: "tags"
     values_list: ["asst_ct","teacher_john_smith"]
  </code></pre>
  
  <hr>
  
  <p><strong>Question:</strong> How do I detect the presence (true or false) of <strong>common elements</strong> between two lists?</p>
  
  <p>Drools Expert has <code>memberOf</code> and <code>contains</code>, but they check a scalar vs a collection, never a collection vs a collection. </p>
  
  <p>I see two potential ways:</p>
  
  <ol>
  <li>introduce a function <code>boolean isIntersecting(list,list)</code> and tell Drools to use that for truth checking</li>
  <li>Implement <code>TeacherHour.attributes[]</code> as a string instead of a list and <code>HourConstraint.valueslist</code> as a regular expression that can match that list</li>
  </ol>