[
https://issues.apache.org/jira/browse/TINKERPOP3-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14494743#comment-14494743
]
Matt Frantz commented on TINKERPOP3-549:
----------------------------------------
I'm hoping to extend the Path API to support a {{Cardinality}} option, and/or
alternate getters.
{noformat}
<A> A get(String)
<A> A get(Cardinality, String)
<A> A getLast(String)
<A> List<A> getList(String)
{noformat}
* The {{get(String)}} API would have the current behavior.
* The {{get(Cardinality, String)}} API would delegate to either
{{getLast(Cardinality.single)}} or {{getList(Cardinality.list)}}. I suppose
supporting {{Cardinality.set}} would be necessary, too, so {{getSet}} would be
added.
* {{getLast}} would return only the most recent value.
* {{getList}} would return the list of values in order of traversal.
Only {{getList}} and {{getLast}} would truly satisfy the promise of the
declared Java Generic API.
Using this new Path API, I want to then "fix" the select step, especially
TINKERPOP3-618. This could be done by adding new {{selectList}}/{{selectLast}}
steps, adding an optional {{Cardinality}} option to {{select}}, or both.
> Path data structure
> -------------------
>
> Key: TINKERPOP3-549
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-549
> Project: TinkerPop 3
> Issue Type: Bug
> Components: process
> Reporter: Daniel Kuppitz
> Fix For: 3.0.0.GA
>
>
> Cover the sample(s) in [Path Data
> Structure|http://www.tinkerpop.com/docs/3.0.0-SNAPSHOT/#path-data-structure]
> with unit tests. At the moment there's nothing that prevents one from
> removing the List-logic in
> [Path::get()|https://github.com/apache/incubator-tinkerpop/blob/master/gremlin-core/src/main/java/com/tinkerpop/gremlin/process/Path.java#L50-L71].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)