Re: Vector Help

From: Row (soul_fly_at_punkass.com)
Date: 04/22/04


Date: 21 Apr 2004 20:43:44 -0700

Thanks for the reply steve,

Unfortunatly i really have no idea about linked lists.
I would like the keep the Iterator, but again i have no idea how to
implement an iterator as a class level variable?
I have tried putint the new Iterator at the top of my main class.

but when i run the program it throws an exception relating to the
Iterator :(

Could you please describe how you would put the list Iterator in a
class method
So a new Iterator isn't created every time i press next / or previous.
like i said im new to this, so I would be so greatfull if you could
show me.!!!!!

thanks once again Steve and everyone else!

Rowan

"SPG" <steve.nospoo.goodsell@nopoo.blueyonder.co.uk> wrote in message news:<LFvhc.27$T87.493699@news-text.cableinet.net>...
> You could use a LinkedList, that makes traversing back and forth simple.
> Your code always gets a new iterator on each click, so you will always show
> the first element in the list.
>
> If you want to keep your code using the listIterator, then I suggest you use
> a class level variable to store an instance of the iterator in.
>
> Good luck,
>
> Steve
>



Relevant Pages

  • Re: mutable list iterators - a proposal
    ... > Replacing items, which is by far the most common need, works fine. ... >> through which the iterator has already passed, ... The fact that lists don't ... def SetBottom: ...
    (comp.lang.python)
  • Re: Fast expanding macros /Was: How to declare recursive factorial function?
    ... that works purely by expansion, in which cases is it possible to make it ... and a purely expandable macro comparing two items ... Let the iterator modify these arguments during iteration... ... lists you always need to decide upon the treatment of "edge- ...
    (comp.text.tex)
  • Re: Vector Help
    ... > Thanks for the reply steve, ... > Unfortunatly i really have no idea about linked lists. ... > I would like the keep the Iterator, but again i have no idea how to ...
    (comp.lang.java)
  • Re: Vector Help
    ... > Thanks for the reply steve, ... > Unfortunatly i really have no idea about linked lists. ... > I would like the keep the Iterator, but again i have no idea how to ...
    (comp.lang.java.help)
  • Re: Iterator Class?
    ... >> there is a significant performace penalty when using getfor long Lists. ... >> available albeit at a slight performance penalty compared to Iterator. ... Farsight Systems Corporation ...
    (comp.lang.java.programmer)