Fixed Bugs with Java Iterators not throwing the correct exception.

This commit is contained in:
2022-05-17 10:45:05 +02:00
parent 31b34f5de1
commit 068cc4a4f7
9 changed files with 44 additions and 33 deletions
@@ -434,6 +434,7 @@ public class ARRAY_FIFO_QUEUE KEY_GENERIC_TYPE extends ABSTRACT_PRIORITY_QUEUE K
@Override
public KEY_TYPE NEXT() {
if(!hasNext()) throw new NoSuchElementException();
KEY_TYPE value = array[index];
removeIndex(index);
index = ++index % array.length;