/** * Provides predicate (not peer-deployable) which returns {@code true} if it receives an element * that is not contained in the passed in collection. * * @param c Collection used for predicate filter. * @param <T> Element type. * @return Predicate which returns {@code true} if it receives an element * that is not contained in the passed in collection. */ public static <T> IgnitePredicate<T> notContains(@Nullable final Collection<T> c) { return c == null || c.isEmpty() ? GridFunc.<T>alwaysTrue() : new P1<T>() { @Override public boolean apply(T t) { return !c.contains(t); } }; }
/** * Provides predicate which returns {@code true} if it receives an element * that is not contained in the passed in collection. * * @param c Collection used for predicate filter. * @param <T> Element type. * @return Predicate which returns {@code true} if it receives an element * that is not contained in the passed in collection. */ public static <T> IgnitePredicate<T> notContains(@Nullable final Collection<T> c) { return c == null || c.isEmpty() ? GridFunc.<T>alwaysTrue() : new NotContainsPredicate(c); }
/** * Gets predicate (not peer-deployable) that returns {@code true} if its free variable * is not 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 not * contained in given collection. */ public static <T> IgnitePredicate<T> notIn(@Nullable final Collection<? extends T> c) { return F.isEmpty(c) ? GridFunc.<T>alwaysTrue() : 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. * * @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 that returns {@code true} if its free variable is not * contained in given collection. */ public static <T> IgnitePredicate<T> notIn(@Nullable final Collection<? extends T> c) { return isEmpty(c) ? GridFunc.<T>alwaysTrue() : new NotContainsPredicate<>(c); }
/** * Provides predicate (not peer-deployable) which returns {@code true} if it receives an element * that is not contained in the passed in collection. * * @param c Collection used for predicate filter. * @param <T> Element type. * @return Predicate which returns {@code true} if it receives an element * that is not contained in the passed in collection. */ public static <T> IgnitePredicate<T> notContains(@Nullable final Collection<T> c) { return c == null || c.isEmpty() ? GridFunc.<T>alwaysTrue() : new P1<T>() { @Override public boolean apply(T t) { return !c.contains(t); } }; }
/** * Provides predicate which returns {@code true} if it receives an element * that is not contained in the passed in collection. * * @param c Collection used for predicate filter. * @param <T> Element type. * @return Predicate which returns {@code true} if it receives an element * that is not contained in the passed in collection. */ public static <T> IgnitePredicate<T> notContains(@Nullable final Collection<T> c) { return c == null || c.isEmpty() ? GridFunc.<T>alwaysTrue() : new NotContainsPredicate(c); }
/** * Gets predicate (not peer-deployable) that returns {@code true} if its free variable * is not 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 not * contained in given collection. */ public static <T> IgnitePredicate<T> notIn(@Nullable final Collection<? extends T> c) { return F.isEmpty(c) ? GridFunc.<T>alwaysTrue() : 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. * * @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 that returns {@code true} if its free variable is not * contained in given collection. */ public static <T> IgnitePredicate<T> notIn(@Nullable final Collection<? extends T> c) { return isEmpty(c) ? GridFunc.<T>alwaysTrue() : new NotContainsPredicate<>(c); }