You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/11/26 07:42:24 UTC

[GitHub] [incubator-hugegraph-computer] coderzc commented on a diff in pull request #202: Improve ListValue api

coderzc commented on code in PR #202:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/202#discussion_r1032753368


##########
computer-api/src/main/java/com/baidu/hugegraph/computer/core/graph/value/ListValue.java:
##########
@@ -106,20 +106,16 @@ public boolean contains(T obj) {
     }
 
     public List<T> values() {
-        return Collections.unmodifiableList(this.values);
+        return value();
     }
 
     public int size() {
         return this.values.size();
     }
 
     @Override
-    public List<Object> value() {
-        List<Object> list = new ArrayList<>(this.values.size());
-        for (T value : this.values) {
-            list.add(value.value());
-        }
-        return list;

Review Comment:
   Why need to unboxing? @javeme 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org