Skip to content

IBidirectionalCursor

Defined in: packages/data/src/cursor/ibidirectional-cursor.ts:6

A cursor over a sequence that can also be walked backward.

T extends DefinedValue = DefinedValue

readonly valid: boolean

Defined in: packages/data/src/cursor/icursor.ts:16

False once moved past the end, or once its element was removed.

ICursor.valid


readonly value: T | undefined

Defined in: packages/data/src/cursor/icursor.ts:19

The element at this position, undefined when not valid.

ICursor.value

advance(): boolean

Defined in: packages/data/src/cursor/icursor.ts:26

Moves one position forward.

boolean

false if that moved past the end.

ICursor.advance


clone(): IBidirectionalCursor<T>

Defined in: packages/data/src/cursor/ibidirectional-cursor.ts:16

An independent cursor at the same position.

IBidirectionalCursor<T>

ICursor.clone


retreat(): boolean

Defined in: packages/data/src/cursor/ibidirectional-cursor.ts:14

Moves one position back.

boolean

false if that moved before the start.