[ https://issues.apache.org/jira/browse/FLINK-4440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15433851#comment-15433851 ]
Ivan Mushketyk commented on FLINK-4440: --------------------------------------- I assume that it will be used for instantiating in test cases, and in library code as well. For example Graph class contains the following code: {code:java} out.collect(new Vertex<K, NullValue>(edge.f0, NullValue.getInstance())); out.collect(new Vertex<K, NullValue>(edge.f1, NullValue.getInstance())); {code} which can be rewritten as: {code:java} out.collect(Vertex.create(edge.f0)); out.collect(Vertex.create(edge.f1)); {code} and this is not the only example. > 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)