ts-collection
Version:
This is re-write of the java collection classes in typescript. There is some tweak as typescript templates are not as equivalent as Java.
85 lines (84 loc) • 3.32 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var NavigableSubMap_1 = require("../treemaputil/NavigableSubMap");
var illegalargumentexception_1 = require("../../lang/illegalargumentexception");
var AscendingSubMap = /** @class */ (function (_super) {
__extends(AscendingSubMap, _super);
function AscendingSubMap(map, fromStart, lo, loInclusive, toEnd, hi, hiInclusive) {
return _super.call(this, map, fromStart, lo, loInclusive, toEnd, hi, hiInclusive) || this;
}
AscendingSubMap.prototype.comparator = function () {
return this.map.comparator();
};
AscendingSubMap.prototype.subMap = function (fromKey, fromInclusiveOrKey, param3, param4) {
var fromInclusive;
var toKey;
var toInclusive;
if (typeof fromInclusiveOrKey === 'boolean') {
fromInclusive = fromInclusive;
toKey = param3;
toInclusive = param4;
}
else {
fromInclusive = false;
toKey = fromInclusiveOrKey;
toInclusive = false;
}
if (!this.inRange(fromKey, fromInclusive)) {
throw new illegalargumentexception_1.IllegalArgumentException();
}
else if (this.inRange(toKey, toInclusive)) {
throw new illegalargumentexception_1.IllegalArgumentException();
}
return new AscendingSubMap(this.map, false, fromKey, fromInclusive, false, toKey, toInclusive);
};
AscendingSubMap.prototype.headMap = function (toKey, toInclusive) {
return null;
};
AscendingSubMap.prototype.tailMap = function (fromKey, fromInclusive) {
return null;
};
AscendingSubMap.prototype.descendingMap = function () {
return null;
};
AscendingSubMap.prototype.keyIterator = function () {
return null;
};
AscendingSubMap.prototype.descendingKeyIterator = function () {
return null;
};
AscendingSubMap.prototype.entrySet = function () {
return null;
};
AscendingSubMap.prototype.subLowest = function () {
return this.absLowest();
};
AscendingSubMap.prototype.subHighest = function () { return this.absHighest(); };
AscendingSubMap.prototype.subCeiling = function (key) {
return this.absCeiling(key);
};
AscendingSubMap.prototype.subHigher = function (key) {
return this.absHigher(key);
};
AscendingSubMap.prototype.subFloor = function (key) {
return this.absFloor(key);
};
AscendingSubMap.prototype.subLower = function (key) {
return this.absLower(key);
};
return AscendingSubMap;
}(NavigableSubMap_1.NavigableSubMap));
exports.AscendingSubMap = AscendingSubMap;