polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Java 8 use...
Date Tue, 30 Jun 2015 15:02:53 GMT
Let me correct myself to the "better" version for Qi4j 2.x;

domainLayer.values( hasTypes -> matchesAny(
    type -> type.equals( Task.class ), hasTypes.types() )
).withMixins( Identity.class );



BUT, it doesn't work anymore to add mixins like this, it seems.
Investigating.

On Tue, Jun 30, 2015 at 4:06 PM, Niclas Hedhman <niclas@hedhman.org> wrote:

>
> Hi,
> Java 8 works rather well in Qi4j 2.x, which I have reported earlier. Here
> is another example;
>
> I wanted to make sure that all my Scheduling Task extends the Identity
> type, so the following line solves that at assembly;
>
> domainLayer.values( item -> filter(
>     new MatchTypeSpecification( Task.class ),
>     item.types()
> ).iterator().hasNext() ).withMixins( Identity.class );
>
> The iterator().hasNext() is the "ugly" bit, but still...
>
> So how would that look like in Qi4j 3.0???
> I don't know yet, and the 10 minute trial to get something neat, didn't
> make it neater than the above.
>
>
> Cheers
> --
> Niclas Hedhman, Software Developer
> http://zest.apache.org - New Energy for Java
>



-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message