UNPKG

list-runner

Version:

a lightweight linked-list implementation that offers both Singly (next) and Doubly data structures (next and previous)

42 lines (33 loc) 1.14 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.CellSingly = void 0; var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _constants = require("../constants"); var CellSingly = /*#__PURE__*/ function () { function CellSingly() { var next = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.CELL; (0, _classCallCheck2["default"])(this, CellSingly); this.type = type; this.next = next; } (0, _createClass2["default"])(CellSingly, [{ key: "getNext", value: function getNext() { return this.next; } }, { key: "setNext", value: function setNext(cell) { this.next = cell; } }]); return CellSingly; }(); // eslint-disable-line import/prefer-default-export exports.CellSingly = CellSingly;