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

documentation "Iterator" should be clearified.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • generic
    • generic



      Name: rlT66838 Date: 06/08/2000


      java version "1.2.2"
      Classic VM (build 1.2.2-L, green threads, nojit)

      - I checked on the website the same problem exists in 1.3.

      In bug 4270728, the evaluator says this about java.util.Iterator:

      "The fundamental issue is that iterators have no current elements.
      ListIterators are positioned between two elements."

      I'm one of these oldtimers that have started with C++. We oldtimers have grown
      up thinking that an iterator points at an element.

      This is a subtle, yet fundamental difference to how things operate in Java.

      This can be confusing. I have just burned several hours trying to put my own
      iterator class together. It just didn't work. No wonder: Java doesn't do it
      the way I've been thinking (before I found that quote).

      I have a feeling there are more people than I myself stuck in this problem.

      There is an easy fix: Add a line or two to the documentation of
      java.util.Iterator, basically repeating the above quote.
      (Review ID: 105890)
      ======================================================================

            shommel Scott Hommel (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: