Class F0


  • public class F0
    extends Object
    Internal utility class that contains not peer-deployable predicates for use in internal logic.
    • Constructor Detail

      • F0

        public F0()
    • Method Detail

      • not

        public static <T> IgnitePredicate<T> not​(@Nullable
                                                 @Nullable IgnitePredicate<? super T>... p)
        Negates given predicates.

        Gets predicate (not peer-deployable) that evaluates to true if any of given predicates evaluates to false. If all predicates evaluate to true the result predicate will evaluate to false.

        Type Parameters:
        T - Type of the free variable, i.e. the element the predicate is called on.
        Parameters:
        p - Predicate to negate.
        Returns:
        Negated predicate (not peer-deployable).
      • notEqualTo

        public static <T> IgnitePredicate<T> notEqualTo​(@Nullable
                                                        T target)
        Gets predicate (not peer-deployable) that evaluates to true if its free variable is not equal to target or both are null.
        Type Parameters:
        T - Type of the free variable, i.e. the element the predicate is called on.
        Parameters:
        target - Object to compare free variable to.
        Returns:
        Predicate (not peer-deployable) that evaluates to true if its free variable is not equal to target or both are null.
      • notIn

        public static <T> IgnitePredicate<T> notIn​(@Nullable
                                                   @Nullable Collection<? extends T> c)
        Gets predicate (not peer-deployable) that returns true if its free variable is not contained in given collection.
        Type Parameters:
        T - Type of the free variable for the predicate and type of the collection elements.
        Parameters:
        c - Collection to check for containment.
        Returns:
        Predicate (not peer-deployable) that returns true if its free variable is not contained in given collection.
      • equalTo

        public static <T> IgnitePredicate<T> equalTo​(@Nullable
                                                     T target)
        Gets predicate (not perr-deployable) that evaluates to true if its free variable is equal to target or both are null.
        Type Parameters:
        T - Type of the free variable, i.e. the element the predicate is called on.
        Parameters:
        target - Object to compare free variable to.
        Returns:
        Predicate that evaluates to true if its free variable is equal to target or both are null.
      • and

        public static <T> IgnitePredicate<T> and​(@Nullable
                                                 @Nullable IgnitePredicate<? super T>[] p1,
                                                 @Nullable
                                                 @Nullable IgnitePredicate<? super T>... p2)
        Get a predicate (non peer-deployable) that evaluates to true if each of its component predicates evaluates to true. The components are evaluated in order they are supplied. Evaluation will be stopped as soon as first predicate evaluates to false. Passed in predicates are NOT copied. If no predicates are passed in the returned predicate will always evaluate to false.
        Type Parameters:
        T - Type of the free variable, i.e. the element the predicate is called on.
        Parameters:
        p1 - Passed in predicates.
        p2 - Passed in predicates.
        Returns:
        Predicate that evaluates to true if each of its component predicates evaluates to true.
      • and

        public static <T> IgnitePredicate<T> and​(@Nullable
                                                 @Nullable IgnitePredicate<? super T> p,
                                                 @Nullable
                                                 @Nullable IgnitePredicate<? super T>... ps)
        Get a predicate (not peer-deployable) that evaluates to true if each of its component predicates evaluates to true. The components are evaluated in order they are supplied. Evaluation will be stopped as soon as first predicate evaluates to false. Passed in predicates are NOT copied. If no predicates are passed in the returned predicate will always evaluate to false.
        Type Parameters:
        T - Type of the free variable, i.e. the element the predicate is called on.
        Parameters:
        ps - Passed in predicate. If none provided - always-false predicate is returned.
        Returns:
        Predicate that evaluates to true if each of its component predicates evaluates to true.
      • in

        public static <T> IgnitePredicate<T> in​(@Nullable
                                                @Nullable Collection<? extends T> c)
        Gets predicate (not peer-deployable) that returns true if its free variable is contained in given collection.
        Type Parameters:
        T - Type of the free variable for the predicate and type of the collection elements.
        Parameters:
        c - Collection to check for containment.
        Returns:
        Predicate (not peer-deployable) that returns true if its free variable is contained in given collection.
      • contains

        public static <T> IgnitePredicate<T> contains​(@Nullable
                                                      @Nullable Collection<T> c)
        Provides predicate (not peer-deployable) which returns true if it receives an element that is contained in the passed in collection.
        Type Parameters:
        T - Element type.
        Parameters:
        c - Collection used for predicate filter.
        Returns:
        Predicate which returns true if it receives an element that is contained in the passed in collection.
      • notContains

        public static <T> IgnitePredicate<T> notContains​(@Nullable
                                                         @Nullable Collection<T> c)
        Provides predicate (not peer-deployable) which returns true if it receives an element that is not contained in the passed in collection.
        Type Parameters:
        T - Element type.
        Parameters:
        c - Collection used for predicate filter.
        Returns:
        Predicate which returns true if it receives an element that is not contained in the passed in collection.
      • isAllNodePredicates

        public static boolean isAllNodePredicates​(@Nullable
                                                  @Nullable IgnitePredicate<?>... ps)
        Tests if all passed in predicates are instances of GridNodePredicate class.
        Parameters:
        ps - Collection of predicates to test.
        Returns:
        True if all passed in predicates are instances of GridNodePredicate class.
      • asMap

        public static <K,​V> Map<K,​V> asMap​(K key,
                                                       V val)
        Creates map with given values, adding a strict not-null check for value.
        Type Parameters:
        K - Key's type.
        V - Value's type.
        Parameters:
        key - Key.
        val - Value.
        Returns:
        Created map.