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

Greg Hogan commented on FLINK-4440:
-----------------------------------

Flink supports a minimum of Java 7 (which is end-of-life) so the current usage 
with the diamond operator is {{Vertex<Integer, NullValue> v = new Vertex<>(42, 
NullValue.getInstance());}}. If we were to add these I think having a second 
constructor without the value parameter would be clearer than creating two new 
static methods.

I think the better long-term solution would be to have Vertex and Edge be 
interfaces or abstract classes to use POJOs instead of tuples.

> Make API for edge/vertex creation less verbose
> ----------------------------------------------
>
>                 Key: FLINK-4440
>                 URL: https://issues.apache.org/jira/browse/FLINK-4440
>             Project: Flink
>          Issue Type: Improvement
>          Components: Gelly
>            Reporter: Ivan Mushketyk
>            Assignee: Ivan Mushketyk
>            Priority: Trivial
>
> It would be better if one could create vertex/edges like this:
> {code:java}
> Vertex<Integer, NullValue> v = Vertex.create(42);
> Edge<Integer, Integer, NullValue> e = Edge.create(5, 6);
> {code}
> Instead of this:
> {code:java}
> Vertex<Integer, NullValue> v = new Vertex<Integer, NullValue>(42, 
> NullValue.getInstance());
> Edge<Integer, Integer, NullValue> e = new Edge<Integer, Integer, 
> NullValue>(5, 6, NullValue.getInstance());
> {code}



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

Reply via email to