title: How to compare and set exact collection in java and drools?
body: <p>I have a java class as below</p>
  
  <pre><code>public  class Ball 
  {
    private int size;
    private String brand;
    private ArrayList&lt;String&gt; colour;
    private HashMap&lt;String, String&gt; price;
  
    //getter and setters
  
  }
  </code></pre>
  
  <p>I want to create Drools rule (java dialect) to read the size, brand and colour and set price map accordingly.</p>
  
  <p>colour ArrayList should match exact e.g. if a ball <strong>has Red, Black &amp; Blue</strong> colour together, then a particular rule should apply.</p>
  
  <p>price map e.g. <strong>[{"US", "1.79"},{"UK", "1.48"},{"UAE", "11.37"}]</strong>. Don't confuse this with json, it is a java HashMap.</p>
  
  <pre><code>rule "rule 1"
  when
  ball : Ball
  (
   size == 14,
   brand ==  "NIVIA",
   colour ==  //here i want to compare exact match of the arraylist.
  )
  then
   ball.setPrice(//here i want to set price map);
  end
  </code></pre>
  
  <p>Please help to create the .drl file</p>