var __extends = (this && this.__extends) || (function () {
    var 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 function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var ArrayList = (function (_super) {
    __extends(ArrayList, _super);
    function ArrayList() {
        var _this = _super.call(this) || this;
        Object.setPrototypeOf(_this, Object.create(ArrayList.prototype));
        return _this;
    }
    ArrayList.prototype.size = function () {
        return this.length;
    };
    ArrayList.prototype.isEmpty = function () {
        return this.size() === 0;
    };
    ArrayList.prototype.contains = function (o) {
        return this.indexOf(o) > -1;
    };
    ArrayList.prototype.toArray = function () {
        return this;
    };
    ArrayList.prototype.containsAll = function (c) {
        var r = true, l = c.length;
        var i;
        for (i = 0; i < l && r; i++) {
            if (!this.contains(c[i])) {
                r = false;
            }
        }
        return r;
    };
    ArrayList.prototype.pushAll = function (c) {
        var _this = this;
        c.forEach(function (d) { return _this.push(d); });
        return this;
    };
    ArrayList.prototype.removeAll = function (c) {
        var _this = this;
        c.forEach(function (d) {
            if (_this.contains(d)) {
                _this.remove(_this.indexOf(d));
            }
        });
        return this;
    };
    ArrayList.prototype.clear = function () {
        this.splice(0, this.length);
    };
    ArrayList.prototype.get = function (index) {
        return this[index];
    };
    ArrayList.prototype.set = function (index, element) {
        this[index] = element;
        return this;
    };
    ArrayList.prototype.remove = function (index) {
        return this.splice(index, 1)[0];
    };
    return ArrayList;
}(Array));
export { ArrayList };
//# sourceMappingURL=ArrayList.js.map