"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SegmentGroupCollection = void 0;
const collections_1 = require("./collections");
class SegmentGroupCollection {
    constructor(segment) {
        this.segment = segment;
        this.segmentGroups = collections_1.ListMakeHead();
    }
    get size() {
        return this.segmentGroups.count();
    }
    get empty() {
        return this.segmentGroups.empty();
    }
    enqueue(segmentGroup) {
        this.segmentGroups.enqueue(segmentGroup);
        segmentGroup.segments.push(this.segment);
    }
    dequeue() {
        return this.segmentGroups.dequeue();
    }
    clear() {
        this.segmentGroups.clear();
    }
    copyTo(segment) {
        this.segmentGroups.walk((sg) => segment.segmentGroups.enqueue(sg));
    }
}
exports.SegmentGroupCollection = SegmentGroupCollection;
//# sourceMappingURL=segmentGroupCollection.js.map