UNPKG

@tripsnek/tmf

Version:

TypeScript Modeling Framework - A TypeScript port of the Eclipse Modeling Framework (EMF)

57 lines 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ETypedElementImpl = void 0; const enamed_element_impl_1 = require("./enamed-element-impl"); class ETypedElementImpl extends enamed_element_impl_1.ENamedElementImpl { static UNBOUNDED_MULTIPLICITY = -1; static UNSPECIFIED_MULTIPLICITY = 0; // private ordered = false; unique = false; eType; lowerBound = ETypedElementImpl.UNSPECIFIED_MULTIPLICITY; upperBound = ETypedElementImpl.UNSPECIFIED_MULTIPLICITY; constructor(name, eType) { super(name); if (eType) this.eType = eType; } getLowerBound() { return this.lowerBound; } setLowerBound(value) { this.lowerBound = value; } getUpperBound() { return this.upperBound; } setUpperBound(value) { this.upperBound = value; } isUnique() { return this.unique; } setUnique(value) { this.unique = value; } getEType() { return this.eType; } setEType(value) { this.eType = value; } isMany() { return (this.upperBound > 1 || this.upperBound === ETypedElementImpl.UNBOUNDED_MULTIPLICITY); } // public isOrdered(): boolean { // return this.ordered; // } // public setOrdered(value: boolean): void { // this.ordered = value; // } isRequired() { return this.lowerBound > 0; } } exports.ETypedElementImpl = ETypedElementImpl; //# sourceMappingURL=etyped-element-impl.js.map