A range cursor is an object that moves to the next range every time you call next on it. Note that, unlike ES6 iterators, these start out pointing at the first element, so you should call next only after reading the first range (if any).
next
The next range's start position.
The position of the set that this range comes from in the array of sets being iterated over.
The next end position.
The next range's value. Holds null when the cursor has reached its end.
null
Jump the cursor to the given position.
Move the iterator forward.
A range cursor is an object that moves to the next range every time you call
nexton it. Note that, unlike ES6 iterators, these start out pointing at the first element, so you should callnextonly after reading the first range (if any).