@All documentation shows concatenation in first example

19 views
Skip to first unread message

John Kida

unread,
Dec 3, 2013, 10:23:49 AM12/3/13
to juk...@googlegroups.com
I am about to give Jukito a whirl but i had a question about the @All documentation found at https://github.com/ArcBees/Jukito/wiki/@All

The example shows if you were to bindManyInstances:
bindManyInstances(String.class, "Hello", "world");

then called:

@Test print(@All String s) { System.out.println(s); }

it would print:
"Hello world"
or:
"world Hello"

This is not what I would expect, I was expecting to see it say it would print:
"Hello"
"world"

or:
"world"
"Hello"

on different lines, not concatenated together.. I guess the doc would make sense if it used System.out.print, and not println
I am hoping the documentation is just misleading me a little bit, as the examples further down when it uses the Cartesian approach dont show it automatically concatenating.

Can someone please clarify?

Thanks.

Philippe Beaudoin

unread,
Dec 3, 2013, 10:34:13 AM12/3/13
to juk...@googlegroups.com

No, no, it shouldn't concatenate. It will call the method multiple times, we just can't guarantee the order.

--
You received this message because you are subscribed to the Google Groups "Jukito" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jukito+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Stephan Classen

unread,
Dec 3, 2013, 10:44:37 AM12/3/13
to juk...@googlegroups.com
Sorry for the confusion. I updated the wiki page to make this clear.
The test method is called twice, once with "Hello" and once with "world" but the order of the calls is not guaranteed.
Reply all
Reply to author
Forward
0 new messages