/**
  * Returns a new Collection containing a - b.
  * The cardinality of each
  * element e in the returned Collection will be the cardinality of e
  * in a minus the cardinality of e in b, or zero, whichever is greater.
  *
  * @param \AppserverIo\Collections\CollectionInterface $a The Collection to subtract from, must not be null
  * @param \AppserverIo\Collections\CollectionInterface $b The Collection to subtract, must not be null
  *
  * @return void
  */
 public static function subtract(CollectionInterface $a, CollectionInterface $b)
 {
     // initialize the array with the value to return that should be returned
     $return = array();
     // iterate over the Collection and check if the object exists in
     // the second Collection
     foreach ($a as $key => $element) {
         // if the object does not exist in the second Collection add
         // it to the return array
         if ($b->exists($key)) {
             $return[$key] = $element;
         }
     }
     // clear all elements and add the subtracted
     $a->clear();
     $a->addAll($return);
 }