}
if (predicatesAndClosures.size() == 0) {
return NOPClosure.INSTANCE;
}
// convert to array like this to guarantee iterator() ordering
Closure defaultClosure = (Closure) predicatesAndClosures.remove(null);
int size = predicatesAndClosures.size();
if (size == 0) {
return (defaultClosure == null ? NOPClosure.INSTANCE : defaultClosure);
}
closures = new Closure[size];