|
Post by Observer on Feb 24, 2002 22:08:07 GMT -5
Can anyone help with my Iterator woes?
I have the commands that work without an Iterator working on the LinkedLists but I've been having trouble with the Iterators (that you need to have for most of the commands like list etc.). I've implemented LinkIterator already but I don't get what they want with each constructor in TwoEndedLinkedList and URLList. Was the LinkedIterator constructor supposed to have a node parameter? Bit confused about all this.
|
|
|
Post by bladehunter on Feb 24, 2002 22:15:56 GMT -5
Firstly, what do u mean by "what they want with each constructor in TwoEndedLinkedList and URLList"?
About the constructor for LinkedIterator, it needs a Node parameter in it or howelse will the Iterator find the next item if there is not even a head item.
|
|
|
Post by Observer on Feb 24, 2002 23:23:34 GMT -5
Yeah, so my LinkedIterator is right as I thought. So in the TwoEndedLinkedList Iterator iterator() method I just create an instance of LinkedIterator and it return it right? and in URLList Iterator iterator() method I use the Iterator iterator() method in TwoEndedLinkedList on my instance of TwoEndedLinkedList being used to store my stuff. Does that make any sense?
May be I just can't think right now but something's not fitting.
|
|
|
Post by Majin_Blues on Feb 25, 2002 0:21:18 GMT -5
there's no need to store tail and size in LinkedIterator, is there?
just a paranoid question
|
|
|
Post by Bahamut on Feb 25, 2002 1:27:09 GMT -5
there's no need to store tail and size in LinkedIterator, is there?
No, there isn't.
This has to be the most clever subject header ever. I'm jealous.
|
|