You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/12/30 12:41:17 UTC
[2/8] ignite git commit: IGNITE-2263: Optimized exist() method.
IGNITE-2263: Optimized exist() method.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f348fe1e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f348fe1e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f348fe1e
Branch: refs/heads/ignite-2263
Commit: f348fe1e8f8c77aa3e200b945f32fe8703ef622b
Parents: f1e16a7
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Dec 30 14:25:59 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Dec 30 14:25:59 2015 +0300
----------------------------------------------------------------------
.../main/java/org/apache/ignite/internal/util/lang/GridFunc.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f348fe1e/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 f95df93..dfbcb4f 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
@@ -2904,15 +2904,13 @@ public class GridFunc {
* @return {@code true} if input collection contains element for which all the provided
* predicates evaluates to {@code true} - otherwise returns {@code false}.
*/
- public static <V> boolean exist(Iterable<? extends V> c, @Nullable IgnitePredicate<? super V>... p) {
+ public static <V> boolean exist(Iterable<? extends V> c, @Nullable IgnitePredicate<? super V> p) {
A.notNull(c, "c");
if (isAlwaysFalse(p))
return false;
else if (isAlwaysTrue(p))
return true;
- else if (isEmpty(p))
- return true;
else
for (V v : c)
if (isAll(v, p))