Iterator<Key> j = countMap.keySet().iterator(); while (j.hasNext()) { Key key = j.next();
for (Key key : countMap.keySet()) {
	public void printCounts(OutputStream out, boolean deltas) {		PrintStream pout = new PrintStream(out);		Iterator<Key> j = countMap.keySet().iterator();		while (j.hasNext()) {			Key key = j.next();			int count = countMap.get(key).intValue();			if (count != 0) {				pout.print(key + ":\t");				if (deltas && count > 0)					pout.print("+");				pout.println(count);			}		}		pout.flush();	}