byKeyValue

Returns a range that performs an inorder iteration over the specified tree.

If tree has changed during the iteration, range will throw an RangeInvalidatedException. In case user knows that the tree can be changed any time, it is possible to call BTreeMapRange.isValid before performing any action on the range to check if fetching the front element, or moving to the next one is guaranteed to success. This is only true for the single-threaded environment.

BTreeMapRange!(BTreeMap)
byKeyValue
(
BTreeMap
)
(
ref BTreeMap tree
,
void[]* buff
)

Parameters

tree BTreeMap

tree to iterate over

buff void[]*

buffer for storing the state of the iteration. Useful for the reusable-memory management strategy. The buffer size is proportional to the height of the tree, so in most cases it should be at most the size of the several pointers. If the allocations are not a concern, null can passed for buff, and range will allocate a buffer on its own.

Return Value

Type: BTreeMapRange!(BTreeMap)

BTreeMapRange performing the full inorder iteration of the tree.

Meta