"However you can find suitable starting points using an iterator with a starting point and moving backwards, for example."
Thanks, I can see how it can be done with iterator, and we can do our own Compare to see if the first and last should be included.
Would you be interested in a foreach approach? that avoids the additional overhead cost of the iterator?
tree.forEach(startObject, startInclusive, endObject, endInclusive, entry -> println(entry.key() + ":" + entry.value()));
tree.forEach(startObject, endObject, entry -> println(entry.key() + ":" + entry.value())); // start and end are inclusive by default
It would use locateKey to get the start point and then another while loop to continue until it reaches the end. While it does the second loop, it calls the function for each Entry. Entry could be BasicEntry or a re-used FastEntry. Again let me know if it's worth looking into a PR for something like this.
Mark