find the least node from a given node. very useful for starting a sorting iterator ... @param node the node from which we will start searching @param index _KEY or _VALUE @return the smallest node, from the specified node, in the specified mapping
(Node node, int index)
| 505 | * specified mapping |
| 506 | */ |
| 507 | static Node leastNode(Node node, int index) |
| 508 | { |
| 509 | Node rval = node; |
| 510 | |
| 511 | if (rval != null) |
| 512 | { |
| 513 | while (rval.getLeft(index) != null) |
| 514 | { |
| 515 | rval = rval.getLeft(index); |
| 516 | } |
| 517 | } |
| 518 | return rval; |
| 519 | } |
| 520 | |
| 521 | /** |
| 522 | * get the next larger node from the specified node |
no test coverage detected