--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/2fb9b6c1-e949-4a0f-a244-f0a44708a671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for this. I took the concepts from that section and applied them to the example for the union step and got something like this:-g.v(1).union(a -> a.get().out().values("name"), b -> b.get().in().values("lang"))
P.S. What is the purpose of the "of()" step? I found it in numerous examples in the docs but could not find an explicit definition.
On Tuesday, December 9, 2014 10:15:36 AM UTC-8, Marko A. Rodriguez wrote:Hello,The mapping between Groovy and Java is pretty simply. I added the following section. Hopefully this helps.Take care,Marko.
On Dec 9, 2014, at 9:04 AM, Dave <da...@davidcrouchcustomhomes.com> wrote:Hi,I'm using Gremlin and Java and cannot work out the syntax for passing parameters to the Union step. An example would be great.I've found that almost all of the examples in the docs for Gremlin steps are in Groovy. Since I'm writing in Java trying to work out the parameters for some steps has been challenging given the new lambda syntax and the not-so-clear correlation to Groovy. Using my IDE's auto-complete usually gives me enough of a hint on what is required (usually just a Traverser). If this fails then I read the Tinkerpop source code.Adding Java examples in the docs would be great. Is this possible for GA?Lastly, could someone provide a general rule-of-thumb guide for converting the Groovy syntax into Java syntax using lambdas? I think I have it but obviously not quite there (since I can't work out the Union step).Thanks,Dave--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/2fb9b6c1-e949-4a0f-a244-f0a44708a671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/59d993e3-070f-462c-be95-b1cba6032ed1%40googlegroups.com.
It just occurred to me to look at the Union step test harness, which gave me what I needed. At one point I was trying g.of().out() but needed g.<Vertex>of().out() (so close!). This detail got lost in my learning curve with the new traverser concept.
Under the covers I'm assuming a new traverser is created for every branch of the Union step, which I believe makes my use of lamdas incorrect? I was using the Jump step as a guide but see that it is different to the other branch steps (Union, Local, Choose, Match) because conceptually it is not executing parallel paths. Is this assumption correct? .... just trying to improve my knowledge.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/d935dcfd-3d8b-40ce-bf41-e0d769e7287b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/e7ad55d6-1fa1-46bd-9e93-a62e1c29468a%40googlegroups.com.