title: Check for specific element in a list in Drools
body: <p>I just have started using Drools (version 5.1.0) so please bear with me in case this question was already answered. </p>
  
  <p>I have a java.util.List object which contains objects of complex type A, with A as:</p>
  
  <pre><code>class A {
    String name; 
    String Value;}
  </code></pre>
  
  <p>The list as well as its elements are in the working memory of the Drools engine. Is there an easy way to fire a rule only if the name and value of an element in the list are matching specific values? </p>
  
  <p>Currently, i am using a self-defined function inside the Drools rule, which iterates over the list and returns true if there is an element that matches the specification, however i wonder whether this is the most efficient and easiest use. </p>