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 2016/01/02 10:21:52 UTC
[13/13] ignite git commit: IGNITE-2263: Removed "lose" and "in"
methods.
IGNITE-2263: Removed "lose" and "in" methods.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/30c21c7d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/30c21c7d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/30c21c7d
Branch: refs/heads/ignite-2263
Commit: 30c21c7d9b5038066b654f773b38f6e33aa169e8
Parents: b38ce07
Author: thatcoach <pp...@list.ru>
Authored: Sat Jan 2 12:17:41 2016 +0300
Committer: thatcoach <pp...@list.ru>
Committed: Sat Jan 2 12:17:41 2016 +0300
----------------------------------------------------------------------
.../ignite/internal/util/lang/GridFunc.java | 72 --------------------
1 file changed, 72 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/30c21c7d/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 760037c..c527708 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
@@ -803,60 +803,6 @@ public class GridFunc {
}
/**
- * Loses all elements in input collection that are contained in {@code filter} collection.
- *
- * @param c Input collection.
- * @param cp If {@code true} method creates new collection not modifying input,
- * otherwise does <tt>in-place</tt> modifications.
- * @param filter Filter collection. If {@code filter} collection is empty or
- * {@code null} - no elements are lost.
- * @param <T> Type of collections.
- * @return Collection of remaining elements
- */
- public static <T0, T extends T0> Collection<T> lose(Collection<T> c, boolean cp, @Nullable Collection<T0> filter) {
- A.notNull(c, "c");
-
- return lose(c, cp, in(filter));
- }
-
- /**
- * Loses all elements in input collection that are evaluated to {@code true} by
- * all given predicates.
- *
- * @param c Input collection.
- * @param cp If {@code true} method creates new collection without modifying the input one,
- * otherwise does <tt>in-place</tt> modifications.
- * @param p Predicate.
- * @param <T> Type of collections.
- * @return Collection of remaining elements.
- */
- public static <T> Collection<T> lose(Collection<T> c, boolean cp, IgnitePredicate<? super T> p) {
- A.notNull(c, "c");
-
- Collection<T> res;
-
- if (!cp) {
- res = c;
-
- if (!isAlwaysFalse(p)) {
- for (Iterator<T> iter = res.iterator(); iter.hasNext(); )
- if (p.apply(iter.next()))
- iter.remove();
- }
- }
- else {
- res = new LinkedList<>();
-
- if (!isAlwaysTrue(p))
- for (T t : c)
- if (!p.apply(t))
- res.add(t);
- }
-
- return res;
- }
-
- /**
* Gets closure which converts node to node ID.
*
* @return Closure which converts node to node ID.
@@ -2283,24 +2229,6 @@ public class GridFunc {
}
/**
- * Gets predicate (not peer-deployable) that returns {@code true} if its free variable is contained
- * in given collection.
- *
- * @param c Collection to check for containment.
- * @param <T> Type of the free variable for the predicate and type of the
- * collection elements.
- * @return Predicate (not peer-deployable) that returns {@code true} if its free variable is
- * contained in given collection.
- */
- public static <T> IgnitePredicate<T> in(@Nullable final Collection<? extends T> c) {
- return isEmpty(c) ? GridFunc.<T>alwaysFalse() : new P1<T>() {
- @Override public boolean apply(T t) {
- return c.contains(t);
- }
- };
- }
-
- /**
* Gets predicate that returns {@code true} if its free variable is not
* contained in given collection.
*