ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [5/5] ignite git commit: IGNITE-2263: Slight optimization for F.concat(Iterator ...)
Date Wed, 30 Dec 2015 10:33:38 GMT
IGNITE-2263: Slight optimization for F.concat(Iterator ...)


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7fa4ba03
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7fa4ba03
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7fa4ba03

Branch: refs/heads/ignite-2263
Commit: 7fa4ba03b9141290d22f6f43fd50062f75b1e0ca
Parents: 8225a41
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Dec 30 13:34:30 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Dec 30 13:34:30 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/util/lang/GridFunc.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7fa4ba03/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
index ea7c2f2..736e933 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java
@@ -736,17 +736,15 @@ public class GridFunc {
     }
 
     /**
-     * Concatenates multiple iterators as single one.
+     * Concatenate two iterators.
      *
-     * @param iters Iterators.
+     * @param iter1 Iterator 1.
+     * @param iter2 Iterator 2.
      * @return Single iterator.
      */
     @SuppressWarnings("unchecked")
-    public static <T> Iterator<T> concat(Iterator<T> ... iters) {
-        if (iters.length == 1)
-            return iters[0];
-
-        return concat(asList(iters).iterator());
+    public static <T> Iterator<T> concat(Iterator<T> iter1, Iterator<T>
iter2) {
+        return concat(asList(iter1, iter2).iterator());
     }
 
     /**


Mime
View raw message