From: Jody G. <jga...@re...> - 2003-10-16 17:06:41
|
>This is causing the first row to get missed. So I guess we need to nail down the way this should work. My assumption was this: > >hasNext() - Gets whether there are more rows. >next() - moves to the next row. >read() - gets the feature at the current row. > >An the initial position is at the first row. > >So you can go: > >while (fr.hasNext()) { > Feature f = fr.read(); > fr.next(); >} > >Is this what everyone else is thinking? > > > It was not what I was thinking. I was thinking that FeatureReader was: hasNext() - if additional Features Exist read() - advances and returns the next Feature When a FeatureReader is initially created it is considered to be "before" the first result. I would really like it if we changed FeatureReader to be: hasNext()- if additional Features Exist next() - advances and returns the next Feature I have implemented FeatureWriter to follow this use Jody |