Re: Java 8 use...

2015-06-30 Thread Niclas Hedhman
A quick check with Google, and it seems that IEnumerable is more of a combination of Iterable and Stream, since it exposes both those behaviors. A Stream can't be enumerated... But I guess it is the closest you get. Looking forward to something "juicy"... ;-) On Tue, Jun 30, 2015 at 6:30 PM, Sta

Re: Java 8 use...

2015-06-30 Thread Stanislav Muhametsin
Hehe, yeah, I remember having "TransientComposite"s for a while, but eventually it didn't really describe the semantics and meaning of that composite type well enough. It did take quite a while of thinking to come up with term "PlainComposite", which is something that tells the reader that this

Re: Java 8 use...

2015-06-30 Thread Niclas Hedhman
Thanks for sharing... PlainComposite --> I like that name better. Any other suggestions instead of TransientComposite? Yes, with presence of Java 8 Stream and Functional APIs, I think the answer is along the lines of what you have done. module.values() --> should probably return a Stream of "so

Re: Java 8 use...

2015-06-30 Thread Stanislav Muhametsin
On 30.6.2015 18:16, Niclas Hedhman wrote: Ah! The full expansion of supertypes doesn't affect HasTypes#types() until after the assembly declarations are completed. I should have realized that up front. domainLayer.values( hasTypes -> matchesAny( type -> Task.class.isAssignableFrom( type ),

Re: Java 8 use...

2015-06-30 Thread Niclas Hedhman
Ah! The full expansion of supertypes doesn't affect HasTypes#types() until after the assembly declarations are completed. I should have realized that up front. domainLayer.values( hasTypes -> matchesAny( type -> Task.class.isAssignableFrom( type ), hasTypes.types() ) ).withMixins( Identity.cla

Re: Java 8 use...

2015-06-30 Thread Niclas Hedhman
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

Java 8 use...

2015-06-30 Thread Niclas Hedhman
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.cl