Skip to content

Latest commit

 

History

History
139 lines (71 loc) · 3.65 KB

File metadata and controls

139 lines (71 loc) · 3.65 KB

danmatrix


danmatrix / DanMatrixRowsIterator

Class: DanMatrixRowsIterator<T>

Defined in: src/iterators/danMatrixRowsIterator.ts:6

The class DanMatrixRowsIterator implements MatrixIterator interface and Iterable interface

Type Parameters

T

T

Implements

Constructors

Constructor

new DanMatrixRowsIterator<T>(matrix): DanMatrixRowsIterator<T>

Defined in: src/iterators/danMatrixRowsIterator.ts:16

The public class constructor

Parameters

matrix

DanMatrix<T>

the DanMatrix object

Returns

DanMatrixRowsIterator<T>

Methods

[iterator]()

[iterator](): Iterator<T[]>

Defined in: src/iterators/danMatrixRowsIterator.ts:75

A zero-argument function that returns an object, conforming to the Iterator Protocol. In Javascript/Typescript in order to be iterable, an object must implement the "@@iterator" method

Returns

Iterator<T[]>

an iterator object.

Implementation of

Iterable.[iterator]


current()

current(): T[] | undefined

Defined in: src/iterators/danMatrixRowsIterator.ts:35

Get the current row, or return undefined if the iterator was not yet started

Returns

T[] | undefined

Implementation of

MatrixIterator.current


hasNext()

hasNext(): boolean

Defined in: src/iterators/danMatrixRowsIterator.ts:59

Check if the iterator can return more rows

Returns

boolean

true if the iterator can return more rows, false if there are no rows left

Implementation of

MatrixIterator.hasNext


next()

next(): T[] | undefined

Defined in: src/iterators/danMatrixRowsIterator.ts:47

Get the next row, or return undefined if the iterator's end was reached

Returns

T[] | undefined

Implementation of

MatrixIterator.next


rewind()

rewind(): void

Defined in: src/iterators/danMatrixRowsIterator.ts:66

Restart the iterator

Returns

void

Implementation of

MatrixIterator.rewind