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)