[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cursors/Iterators



At 05:16 PM 8/21/00 +0200, Falko Braeutigam wrote:
>On Mon, 21 Aug 2000, Robert Colquhoun wrote:
> > Hi,
> >
> > This is a beginner question - i am having real trouble getting some 
> kind of
> > cursor to work, in the class below every time next() is called it returns
> > the first element from the iterator, not progressing to the second element
> > and never reaching the end of the list.
>Did you mark the next() method to be an update method? If not, the changes of
>the iterator (i.next()) are not persistent.

I added /*update*/ to the interface PRICES which PRICESImpl implements.  Is 
that the right place, or should the update comment be in PRICESImpl itself?

ie
public interface PRICES {
     public String get(String key);
     public void set(String key, String val); /*update*/
     public String getCursor(); /*update*/
     public String next(String key); /*update*/
}

 > PS I was looking at the way new objects are added to the database - from
> > another project(a compiler) i have some classes to create classfiles on 
> the
> > fly(ie make the *Proxy classes on the run) which would remove the need for
> > the dependency on sun.tools.javac and opp if anybody is interested.
>Sure. Thanks. Send it to me. I will see if I can use it.

There are three classes i will send them in a private mail(unless someone 
else is interested).

- Robert