Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8204665

Iterator Interface contract is confusing

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      "Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics."
      - Removing elements during iteration will throw RuntimeException as collection is modified during iteration
      - It is perfectly fine for not providing remove( ) method implementation as sometimes client just want to iterate over collection and then throw away the object.


        Attachments

          Activity

            People

            • Assignee:
              psonal Pallavi Sonal
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: