LambdaJCollection: .forEach(Class<T>)

58 views
Skip to first unread message

Dmitriy Vsekhvalnov

unread,
Mar 19, 2012, 9:34:24 AM3/19/12
to lam...@googlegroups.com
Quick question:
  
  i have some call like that:

 with(route.iterator())
                .extract(on(Route.class).placeWith(pos))
                .retain(notNullValue())
                .forEach()
                .add(contract);

Which obviously will fail with 'forEach() is unable to introspect on an empty iterator. Use the overloaded method accepting a class instead'  if it got empty collection after retaining.

Is it intentional forEach(Iterable<? extends T> iterable, Class<T> clazz) is not exposed to LambdaJCollection?  I feel ok to add this, but would like to hear why it's not in-place (side effects)?


  

Mario Fusco

unread,
Mar 19, 2012, 10:13:42 AM3/19/12
to lam...@googlegroups.com
To be honest, no, there isn't any reason. I just forgot it.
Thanks for reporting this, I am going to add it.

Mario

Dmitriy Vsekhvalnov

unread,
Mar 19, 2012, 10:59:40 AM3/19/12
to lam...@googlegroups.com
Thanks.
Reply all
Reply to author
Forward
0 new messages