blob: 3ecd7d78e5da5f267b801a3e1b5927d23f01f939 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
"use strict";
const AbstractList = require("./abstract_list.js");
const Point = require("./point.js");
class PointList extends AbstractList {
get firstPoint() {
return this._list[0];
}
get secondLastPoint() {
return this._list[this._list.length - 2];
}
get lastPoint() {
return this._list[this._list.length - 1];
}
}
PointList._itemClass = Point;
PointList._itemName = "point";
module.exports = PointList;
|