01: package org.contineo.core.searchengine.util;
02:
03: import java.util.Collection;
04: import java.util.Iterator;
05:
06: /*
07: * Created on 15.11.2004
08: */
09: public class EdgeCounter {
10: /**
11: *
12: */
13: public static int count(Collection keywords) {
14: Iterator iter = keywords.iterator();
15: int count = 0;
16:
17: while (iter.hasNext()) {
18: try {
19: TermEntry entry = (TermEntry) iter.next();
20: count += entry.getDocuments().size();
21: } catch (Exception e) {
22: e.printStackTrace();
23: }
24: }
25:
26: return count;
27: } // end method count
28:
29: } // end class EdgeCounter
|