import { IteratorExpression } from '../Expression' ; import { OclExecutionContext } from '../../OclExecutionContext' ; import { SelectExpression } from './SelectExpression' ; oclExpression oclExample export class OneExpression extends IteratorExpression { evaluate ( visitor , localVariables ? ) { const selectExpression = new SelectExpression ( this . getSource ( ) ) ; selectExpression . setBody ( this . getBody ( ) ) ; selectExpression . setIterators ( this . getIterators ( ) ) ; const result = selectExpression . evaluate ( visitor , localVariables ) ; return result . length === 1 ; } }