Soups

Ending at the Right Place as Well

If you add an endKey as well as a beginKey, then the leaf nodes at the right of the tree can also be skipped in the search (see FIGURE 9.6). The cursor uses the endKey to determine when the last of the matching nodes has been reached and when searching can stop.

FIGURE 9.6 : Entries visited when using a beginKey and endKey.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996