@Test public void testIterator() { final Iterator<String> it = set.iterator(); assertTrue(it.hasNext()); assertEquals(KEY, it.next()); assertFalse(it.hasNext()); }
@Override public Iterator<K> iterator() { return new Iterator<>() { private final AbstractIterator<K, ?> itr = map().iterator(); @Override public boolean hasNext() { return itr.hasNext(); } @Override public K next() { return itr.next().getKey(); } @Override public void remove() { itr.remove(); } }; }
MutableKeySet extends AbstractKeySet<K> { @Override public Iterator<K> iterator() { return new Iterator<>() { private final AbstractIterator<K, ?> itr = map().iterator(); @Override public boolean hasNext() { return itr.hasNext(); } @Override public K next() { return itr.next().getKey(); } @Override public void remove() { itr.remove(); } }; } }
MutableKeySet extends AbstractKeySet<K> { @Override public Iterator<K> iterator() { return new Iterator<>() { private final AbstractIterator<K, ?> itr = map().iterator(); @Override public boolean hasNext() { return itr.hasNext(); } @Override public K next() { return itr.next().getKey(); } @Override public void remove() { itr.remove(); } }; } MutableKeySet(final MutableTrieMap<K, ?> map); }
MutableKeySet extends AbstractKeySet<K> { @Override public Iterator<K> iterator() { return new Iterator<>() { private final AbstractIterator<K, ?> itr = map().iterator(); @Override public boolean hasNext() { return itr.hasNext(); } @Override public K next() { return itr.next().getKey(); } @Override public void remove() { itr.remove(); } }; } MutableKeySet(final MutableTrieMap<K, ?> map); @Override Iterator<K> iterator(); @Override void clear(); @Override @SuppressWarnings("checkstyle:parameterName") boolean remove(final Object o); }
MutableKeySet extends AbstractKeySet<K> { @Override public Iterator<K> iterator() { return new Iterator<>() { private final AbstractIterator<K, ?> itr = map().iterator(); @Override public boolean hasNext() { return itr.hasNext(); } @Override public K next() { return itr.next().getKey(); } @Override public void remove() { itr.remove(); } }; } MutableKeySet(final MutableTrieMap<K, ?> map); @Override Iterator<K> iterator(); @Override void clear(); @Override @SuppressWarnings("checkstyle:parameterName") boolean remove(final Object o);  }