You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/10/14 23:27:05 UTC

[jira] [Commented] (TINKERPOP3-888) GraphTraversal.property overloads

    [ https://issues.apache.org/jira/browse/TINKERPOP3-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957814#comment-14957814 ] 

Marko A. Rodriguez commented on TINKERPOP3-888:
-----------------------------------------------

This is a good idea. We have this same overload pattern for {{has(...)}} so we should repeat it here.

> GraphTraversal.property overloads
> ---------------------------------
>
>                 Key: TINKERPOP3-888
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-888
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.1-incubating
>            Reporter: Matt Frantz
>            Assignee: Matt Frantz
>            Priority: Minor
>              Labels: breaking
>             Fix For: 3.1.0-incubating
>
>
> To improve type safety in the {{property}} step, we should change the interface from ...
> {noformat}
> property(VertexProperty.Cardinality cardinality, Object key, Object value, Object...keyValues)
> property(Object key, Object value, Object...keyValues)
> {noformat}
> ... to ...
> {noformat}
> property(VertexProperty.Cardinality cardinality, String key, Object value, Object...keyValues)
> property(String key, Object value, Object...keyValues)
> property(VertexProperty.Cardinality cardinality, T key, Object value, Object...keyValues)
> property(String key, T value, Object...keyValues)
> {noformat}
> Specifically, this makes it explicit that keys may only be {{T}} or {{String}} type. 
> This would  NOT address the lack of type safety in the variadic {{keyValues}} list.
> This is a breaking change for application developers, since it makes the key type more specific.  However, it does not restrict the actual values supported, as key values that were not {{T}} or {{String}} would have been rejected at runtime previously.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)