You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Matt Frantz (JIRA)" <ji...@apache.org> on 2015/07/29 18:49:05 UTC
[jira] [Created] (TINKERPOP3-788) Curry step
Matt Frantz created TINKERPOP3-788:
--------------------------------------
Summary: Curry step
Key: TINKERPOP3-788
URL: https://issues.apache.org/jira/browse/TINKERPOP3-788
Project: TinkerPop 3
Issue Type: Improvement
Components: process
Reporter: Matt Frantz
Assignee: Marko A. Rodriguez
The {{curry}} step would be a way to introduce user-defined types without lambdas.
{noformat}
<E2> GraphTraversal<S, E2> curry(Class<? extends E2> c);
{noformat}
It would be the equivalent of a {{map}} step that instantiates the class with a single constructor argument provided by the traverser.
{noformat}
g.V().curry(MyType.class)
g.V().<MyType>map{it -> new MyType(it.get())}
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)