Пример #1
0
    public override Object Clone()
    {
        CollectionRangeImpl theClone = (CollectionRangeImpl)base.Clone();

        theClone.first = (OclExpression)first.Clone();
        theClone.last  = (OclExpression)last.Clone();

        ((OclExpressionImpl)theClone.first).setCollectionRange(theClone);
        ((OclExpressionImpl)theClone.last).setCollectionRange(theClone);

        return(theClone);
    }
Пример #2
0
        public CollectionRange createCollectionRange(
            OclExpression from,
            OclExpression to)
        {
            CollectionRange exp = new CollectionRangeImpl();

            exp.setFactory(this);

            exp.setFirst(from);
            ((OclExpressionImpl)from).setCollectionRange(exp);
            exp.setLast(to);
            ((OclExpressionImpl)to).setCollectionRange(exp);

            exp.setType(from.getType());

            return(exp);
        }