|
|
Re: how to write (existing) java 8 lambda in xtend [message #1787367 is a reply to message #1787317] |
Thu, 24 May 2018 07:34 |
Christian Eugster Messages: 203 Registered: July 2009 Location: St. Gallen Switzerland |
Senior Member |
|
|
Hi
I tried this one
override Set<DescriptionAreaLink> getDescriptionAreaLinks(ElementState state)
{
return this.descriptionAreaLinks.stream.filter[e | state.check(e.isDeleted())].collect(Collectors::toSet);
}
but the editor complains, that the return value of Set<JpaDescriptionAreaLink> does not match the expected Set<DescriptionAreaLink>. The set descriptionAreaLinks is a Set<JpaDescriptionAreaLinks> and JpaDescriptionAreaLink is a subclass of DescriptionAreaLink. In java there I have no problem with it as it seems that java handles this internally. How can I achieve this with lambdas in xtend?
I want to say that it is really a big pleasure to work with xtend. I like it very much. Congratulations for this work!
Christian
[Updated on: Thu, 24 May 2018 07:35] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03162 seconds