Hide menu
Loading...
Searching...
No Matches
DimensionComponent

Defines a PMI dimension component.

Extends

Constructors

Constructor

‍new DimensionComponent(nominalValue?, type?): DimensionComponent

Creates a dimension component from nominal value and dimension type.

Parameters

nominalValue?

number = 0

Nominal value.

type?

DimensionType = DimensionType.UNDEFINED

Dimension type.

Returns

DimensionComponent

Overrides

SemanticComponent.constructor

Properties

attributes

‍readonly attributes: Set<SemanticAttribute>

Inherited from

SemanticComponent.attributes


nominalValue

‍nominalValue: number = 0

Nominal value.


type

‍type: DimensionType = DimensionType.UNDEFINED

Dimension type.

Accessors

id

Get Signature

‍get id(): bigint

Returns the unique identifier of the object.

Returns

bigint

Inherited from

SemanticComponent.id

Methods

accept()

‍accept(visitor): void

Accepts a semantic attribute visitor or semantic component visitor.

If the visitor is a SemanticComponentVisitor, it will invoke the SemanticComponentVisitor.visitDimensionComponent method. Else if the visitor is a SemanticAttributeVisitor, it will invoke the accept method of each attribute.

Parameters

visitor

SemanticAttributeVisitor | SemanticComponentVisitor

Visitor to accept.

Returns

void

Overrides

SemanticComponent.accept


addAttribute()

‍addAttribute(attribute): void

Adds a semantic attribute.

Parameters

attribute

SemanticAttribute

Semantic attribute.

Returns

void

Deprecated

Use SemanticComponent.attributes and attributes.add instead.

Inherited from

SemanticComponent.addAttribute


hasAttributes()

‍hasAttributes(): boolean

Returns whether this component has attributes.

Returns

boolean

Deprecated

Use SemanticComponent.attributes and attributes.size > 0 instead.

Inherited from

SemanticComponent.hasAttributes


numberOfAttributes()

‍numberOfAttributes(): number

Returns the number of semantic attributes.

Returns

number

Deprecated

Use SemanticComponent.attributes and attributes.size instead.

Inherited from

SemanticComponent.numberOfAttributes