Re: elements vs sets



Date view Thread view Subject view Author view

Mark Richters (mr@informatik.uni-bremen.de)
25 Feb 2000 16:44:10 +0100


Jos Warmer <J.Warmer@klasse.nl> writes: > You are right. In fact this makes a point for removing the > 'asSequence' operation from OCL. The use can be replaced by > the operation 'sortedBy(expression)', which is already included in > OCL. 'sortedBy' is defined on Collection and results in a Sequence > where an expression is used as the ordening criterion. This > is a deterministic way of making a Sequence out of a Set or Bag. > > What do you think ? Yes, I think that makes sense. Just a note: there is a little error in the OCL 1.3 documentation. The result type of sortedBy is specified as Boolean on p. 7-38 which should rather read Sequence(T) as you say above. Regards, Mark -- Mark Richters (mr@informatik.uni-bremen.de)


Date view Thread view Subject view Author view