On Thu, Apr 28, 2011 at 3:20 PM, Pierre-Arnaud Marcelot <pa@marcelot.net> wrote:

On 28 avr. 2011, at 13:39, Kiran Ayyagari wrote:

> On Thu, Apr 28, 2011 at 4:38 PM, Emmanuel Lecharny <elecharny@gmail.com> wrote:

SNIP ...
 
This would be my preference as well (with another method to access the IntermediateResponse too).

But I would add other convenient methods like:
- boolean nextEntry();
- boolean nextReferral();
- boolean nextIntermediate();
- boolean previousEntry();
- boolean previousReferral();
- boolean previousIntermediate();
This methods would allow the user to jump to the next/previous object of their choice easily.


This would be hard to implement, almost impossible to do efficiently.

 
For example, this snippet would allow the user to get all entries from a search cursor in a much nicer way than today:
> while ( cursor.nextEntry() )
> {
>       Entry entry = cursor.getEntry();
> }

Other methods to know what is the type of the current object in the cursor would also be useful like:
- boolean isCurrentEntry();
- boolean isCurrentReferral();
- boolean isCurrentIntermediate();


:-) I just posted something similar. Working my way through the thread. Grew out quit fast.

Regards,
Alex