* @param mergeWorking : if true, then matching occurs if the periods hava non-zero work, otherwise the work
* must be an exact match.
*/
public void forEachWorkingInterval(Closure visitor, boolean mergeWorking, WorkCalendar workCalendar) {
Comparator comparator = (mergeWorking ? null : WorkComparator.getInstance()); // if a value of null is used , then the bars will be grouped based on time only
Merge merge = Merge.getInstance(visitor, comparator);
Query.getInstance().groupBy(contourGeneratorInstance(WORK))
.action(merge)
.execute();
}