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/10/14 23:06:05 UTC

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

Matt Frantz created TINKERPOP3-888:
--------------------------------------

             Summary: 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
             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)