* Returns Block by passed index * * @param {number} index - index to get. -1 to get last * @returns {Block}
(index: number)
| 653 | * @returns {Block} |
| 654 | */ |
| 655 | public getBlockByIndex(index: number): Block | undefined { |
| 656 | if (index === -1) { |
| 657 | index = this._blocks.length - 1; |
| 658 | } |
| 659 | |
| 660 | return this._blocks[index]; |
| 661 | } |
| 662 | |
| 663 | /** |
| 664 | * Returns an index for passed Block |