TryGetFloor(Int32, out Int32, out CosObject) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Finds the greatest key that is not greater than key, and its value.

public bool TryGetFloor(int key, scoped out int floorKey, [MaybeNullWhen(false)] scoped out CosObject value)

Parameters

key
Int32

The key.

floorKey
Int32

The greatest key in the tree not greater than key.

value
CosObject

Its value, resolved one level.

Returns

Boolean
true when the tree holds such a key.

Remarks

ISO 32000-2 §7.9.7. This is how a range keyed by its first number is found, as page labels are (§12.4.2). Reads the whole tree once, then answers from its index until the tree changes.