import { ContinuousDynamicExpression } from "../Expressions/ContinuousExpressions/ContinuousDynamicExpression" ; import { InstantaneousDynamicExpression } from "../Expressions/InstantaneousDynamicExpression" ; import { MultiExpression } from "../Expressions/MultiExpression" ; export class DynamicsContainer { constructor ( dynamicExpression , staffNumber ) { if ( dynamicExpression instanceof ContinuousDynamicExpression ) { this . continuousDynamicExpression = dynamicExpression ; } else if ( dynamicExpression instanceof InstantaneousDynamicExpression ) { this . instantaneousDynamicExpression = dynamicExpression ; } this . staffNumber = staffNumber ; } public continuousDynamicExpression : ContinuousDynamicExpression ; public instantaneousDynamicExpression : InstantaneousDynamicExpression ; public staffNumber : number ; public parMultiExpression ( ) { if ( this . continuousDynamicExpression ) { return this . continuousDynamicExpression . StartMultiExpression ; } if ( this . instantaneousDynamicExpression ) { return this . instantaneousDynamicExpression . ParentMultiExpression ; } return undefined ; } public CompareTo ( other ) { return this . parMultiExpression ( ) . AbsoluteTimestamp . CompareTo ( other . parMultiExpression ( ) . AbsoluteTimestamp ) ; } }