MCPcopy Create free account
hub / github.com/ReadyTalk/avian / MyIterator

Class MyIterator

classpath/java/util/LinkedHashMap.java:245–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243 }
244
245 private class MyIterator implements Iterator<Entry<K, V>> {
246 private LinkedKey<K> current = first;
247
248 public Entry<K, V> next() {
249 if (!hasNext()) {
250 throw new NoSuchElementException();
251 }
252 Entry<K, V> result = find(current.key);
253 current = current.next;
254 return result;
255 }
256
257 public boolean hasNext() {
258 return current != null;
259 }
260
261 public void remove() {
262 LinkedHashMap.this.remove(current == null ?
263 last.key : current.previous.key);
264 }
265 }
266}
267

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected