ObjectSet<Entry<Void>> () { return new AbstractObjectSet<Entry<Void>>() { @Override public ObjectIterator<Entry<Void>> iterator() { IntIterator iterator = trigrams.intIterator(); return new AbstractObjectIterator<Entry<Void>>() { @Override public boolean hasNext() { return iterator.hasNext(); } @Override public Entry<Void> next() { int key = iterator.nextInt(); return new Entry<Void>() { @Override public int getIntKey() { return key; } @Override public Void getValue() { return null; } @Override public Void setValue(Void value) { throw new UnsupportedOperationException(); } }; } }; } @Override public int size() { return trigrams.size(); } }; }