Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EDataType and '<' operation in OCL expression
EDataType and '<' operation in OCL expression [message #566104] Tue, 07 February 2006 17:07
Radomil Dvorak is currently offline Radomil DvorakFriend
Messages: 249
Registered: July 2009
Senior Member

Is '<' operation defined for EDataType which points by
EDataType::instanceClass to a java class which
implements Comparable?
As mentioned in the thread 'order of returned items', the 'sortedBy'
operation on collections implemented by EMFT
understands the definition of '<' operation as implementation of
'java.lang.Comparable' interface.

It works for me in the following example with use of ecore::EDate:
This is the context classifier described in emfatic source.
class Topic {
attr String[1] name;
attr Date startDate;
attr Date endDate;

1) the following expression works fine and is evaluated by using
Bag { startDate, endDate }->sortedBy(d|d)->last() = endDate

2) but the expression below fails with: "AnyType: the source of operation:
(lessThan) must be an EClass"
startDate < endDate

Am I wrong to expect that if '<' was found as defined in 'sortedBy' it
should be resolved also in the second expression?

Previous Topic:'insertAt' operation..................................
Next Topic:EDataType and '<' operation in OCL expression
Goto Forum:

Current Time: Fri Dec 08 07:11:34 GMT 2023

Powered by FUDForum. Page generated in 0.02182 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top