queryRange method
All intervals overlapping the inclusive range [low, high], in ascending
low order. Requires low <= high.
Audited: 2026-06-12 11:26 EDT
Implementation
List<IntervalEntry<T>> queryRange(num low, num high) {
// Enforced in release (an assert strips): low > high silently returns no
// results instead of signaling an inverted query range.
if (low > high) {
throw ArgumentError('low ($low) must be <= high ($high)');
}
final List<IntervalEntry<T>> results = <IntervalEntry<T>>[];
_collect(_root, low, high, results);
return results;
}