From: Jimmy Z. <cra...@co...> - 2007-04-04 18:11:00
|
What if a bookmark object is created, but not yet bind to a non-null VTDNav object... recordCursorPosition() and setCursorPosition() would throw NullPointerException.. would that bother you? ----- Original Message ----- From: "Rodrigo Cunha" <rn...@gm...> To: "Jimmy Zhang" <cra...@co...> Sent: Wednesday, April 04, 2007 3:00 AM Subject: Re: [Vtd-xml-users] Random Access Proposal (take 2) > Jimmy Zhang wrote: >> I just added getNav() and checked into CVS... anything else >> you have in mind? > > Yes: > > unbind(), or bind(vn) accepting null, but I think unbind is better, > leads to less errors. > > recordCursorPosition() with no parameters > > equivalent to xpto.recordCursorPosition(xpto.getNav()); but more elegant > and faster, especially if directly implemented with less checks. > > setCursorPosition() with no parameters > equivalent to xpto.setCursorPosition(xpto.getNav()); but more elegant > and faster, especially if directly implemented with less checks. > > > Cheers, > > Rodrigo > |