Fixed Bugs with Java Iterators not throwing the correct exception.
This commit is contained in:
1 parent
31b34f5de1
commit
068cc4a4f7
9 files changed
+44
-33
No files matched your search
+1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user