diffusion
Version:
Diffusion JavaScript client
64 lines (63 loc) • 1.97 kB
JavaScript
;
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BranchMappingTableBuilderImpl = void 0;
var branch_mapping_table_1 = require("./branch-mapping-table");
/**
* BranchMappingTable builder implementation.
*
* @since 6.7
*/
var BranchMappingTableBuilderImpl = /** @class */ (function () {
function BranchMappingTableBuilderImpl() {
/**
* the branch mappings
*/
this.mappings = [];
}
/**
* @inheritdoc
*/
BranchMappingTableBuilderImpl.prototype.reset = function () {
this.mappings = [];
return this;
};
/**
* @inheritdoc
*/
BranchMappingTableBuilderImpl.prototype.addBranchMapping = function (sessionFilter, topicTreeBranch) {
this.mappings.push({
sessionFilter: sessionFilter,
topicTreeBranch: topicTreeBranch
});
return this;
};
/**
* @inheritdoc
*/
BranchMappingTableBuilderImpl.prototype.create = function (sessionTreeBranch) {
return new branch_mapping_table_1.BranchMappingTableImpl(sessionTreeBranch, __spreadArray([], __read(this.mappings)));
};
return BranchMappingTableBuilderImpl;
}());
exports.BranchMappingTableBuilderImpl = BranchMappingTableBuilderImpl;