Urara-Blog/node_modules/.pnpm-store/v3/files/63/69d96756f0800088f59b64b27d052faf525d35ccfa846d5e822e8d9a5443de72fca6a43c5d833eaa37bacfa4173fa28ce39cd7fb8f83bb4e581b8cdc1b7072
2022-08-14 01:14:53 +08:00

39 lines
1,011 B
Text

/**
* @fileoverview Define the abstract class about cursors which manipulate another cursor.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const Cursor = require("./cursor");
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* The abstract class about cursors which manipulate another cursor.
*/
module.exports = class DecorativeCursor extends Cursor {
/**
* Initializes this cursor.
* @param {Cursor} cursor The cursor to be decorated.
*/
constructor(cursor) {
super();
this.cursor = cursor;
}
/** @inheritdoc */
moveNext() {
const retv = this.cursor.moveNext();
this.current = this.cursor.current;
return retv;
}
};