01: package org.drools.jsr94.rules;
02:
03: import java.util.ArrayList;
04: import java.util.Iterator;
05: import java.util.List;
06:
07: class IteratorToList {
08: public static List convert(Iterator it) {
09: List list = new ArrayList();
10: while (it.hasNext()) {
11: list.add(it.next());
12: }
13: return list;
14: }
15: }
|