@Test public void iterateAll() throws JWNLException { long start = System.currentTimeMillis(); for (POS pos : POS.getAllPOS()) { Iterator<Exc> ie = d.getExceptionIterator(pos); while (ie.hasNext()) { ie.next(); } Iterator<IndexWord> ii = d.getIndexWordIterator(pos); while (ii.hasNext()) { ii.next(); } Iterator<Synset> si = d.getSynsetIterator(pos); while (ii.hasNext()) { si.next(); } } long end = System.currentTimeMillis(); System.out.println("Iteration (ms):\t" + (end - start)); }