title: HashSet iteration
body: <p>I have a query regarding iterator of HashSet in Java.
  In book "Java Generics and Collections", following is stated:</p>
  
  <blockquote>
    <p>The chief attraction of a hash table implementation for sets is the (ideally) constanttime
    performance for the basic operations of add, remove, contains, and size. Its main
    disadvantage is its iteration performance; since iterating through the table involves
    examining every bucket, its cost is proportional to the table size regardless of the size
    of the set it contains.</p>
  </blockquote>
  
  <p>It states that iterator looks in every bucket of underlying table. But going through actual implementation(JDK 8), I see that HashIterator stores next node
  reference. So it seems iterator doesn't need to visit every single bucket.</p>
  
  <p>Is book wrong here OR my understanding is wrong?</p>