test_class.file: modules/ml/src/test/java/org/apache/ignite/ml/dataset/impl/cache/util/IteratorWithConcurrentModificationCheckerTest.java
test_class.identifier: IteratorWithConcurrentModificationCheckerTest
test_case.body: @Test(expected = ConcurrentModificationException.class)
      public void testNextWhenIteratorHasLessElementsThanExpected() {
          List<Integer> list = Arrays.asList(1, 2, 3);
  
          Iterator<Integer> iter = new IteratorWithConcurrentModificationChecker<>(list.iterator(), 4, "Exception");
  
          assertEquals(Integer.valueOf(1), iter.next());
          assertEquals(Integer.valueOf(2), iter.next());
          assertEquals(Integer.valueOf(3), iter.next());
  
          iter.next(); // Should throw an exception.
      }
test_case.class_method_signature: IteratorWithConcurrentModificationCheckerTest.testNextWhenIteratorHasLessElementsThanExpected()
test_case.full_signature: @Test(expected = ConcurrentModificationException.class) public void testNextWhenIteratorHasLessElementsThanExpected()
test_case.identifier: testNextWhenIteratorHasLessElementsThanExpected
test_case.invocations: asList iterator assertEquals valueOf next assertEquals valueOf next assertEquals valueOf next next
test_case.modifiers: @Test(expected = ConcurrentModificationException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNextWhenIteratorHasLessElementsThanExpected()
focal_class.declarator: delegate
focal_class.modifier: private final
focal_class.original_string: private final Iterator<T> delegate;
focal_class.type: Iterator<T>
focal_class.var_name: delegate
focal_class.declarator: expCnt
focal_class.modifier: private
focal_class.original_string: private long expCnt;
focal_class.type: long
focal_class.var_name: expCnt
focal_class.declarator: eMsg
focal_class.modifier: private final
focal_class.original_string: private final String eMsg;
focal_class.type: String
focal_class.var_name: eMsg
focal_class.file: modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/util/IteratorWithConcurrentModificationChecker.java
focal_class.identifier: IteratorWithConcurrentModificationChecker
focal_class.interfaces: implements Iterator<T>
focal_class.class_method_signature: IteratorWithConcurrentModificationChecker.IteratorWithConcurrentModificationChecker(Iterator<T> delegate, long expCnt, String eMsg)
focal_class.full_signature: public  IteratorWithConcurrentModificationChecker(Iterator<T> delegate, long expCnt, String eMsg)
focal_class.identifier: IteratorWithConcurrentModificationChecker
focal_class.modifiers: public
focal_class.parameters: (Iterator<T> delegate, long expCnt, String eMsg)
focal_class.signature:  IteratorWithConcurrentModificationChecker(Iterator<T> delegate, long expCnt, String eMsg)
focal_class.class_method_signature: IteratorWithConcurrentModificationChecker.hasNext()
focal_class.full_signature: @Override public boolean hasNext()
focal_class.identifier: hasNext
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasNext()
focal_class.class_method_signature: IteratorWithConcurrentModificationChecker.next()
focal_class.full_signature: @Override public T next()
focal_class.identifier: next
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T next()
focal_method.body: @Override public T next() {
          try {
              T next = delegate.next();
  
              if (expCnt == 0)
                  throw new ConcurrentModificationException(eMsg);
  
              expCnt--;
  
              return next;
          }
          catch (NoSuchElementException e) {
              if (expCnt == 0)
                  throw e;
              else
                  throw new ConcurrentModificationException(eMsg);
          }
      }
focal_method.class_method_signature: IteratorWithConcurrentModificationChecker.next()
focal_method.full_signature: @Override public T next()
focal_method.identifier: next
focal_method.invocations: next
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: T
focal_method.signature: T next()