org.apache.ignite.internal.util

## Class F0

- java.lang.Object
- - org.apache.ignite.internal.util.F0

    public class F0
    extends Object

Internal utility class that contains not peer-deployable predicates for use in internal logic.

### Constructor Summary

Constructors
Constructor and Description
`F0()`

### Method Summary

Methods
`static <T> IgnitePredicate<T>` `and(IgnitePredicate<? super T>[] p1, IgnitePredicate<? super T>... p2)` Get a predicate (non peer-deployable) that evaluates to `true` if each of its component predicates evaluates to `true`.
`static <T> IgnitePredicate<T>` `and(IgnitePredicate<? super T> p, IgnitePredicate<? super T>... ps)` Get a predicate (not peer-deployable) that evaluates to `true` if each of its component predicates evaluates to `true`.
`static CacheEntryPredicate` `and0(CacheEntryPredicate[] p1, CacheEntryPredicate... p2)`
`static CacheEntryPredicate` `and0(CacheEntryPredicate p, CacheEntryPredicate... ps)`
`static <K,V> Map<K,V>` `asMap(K key, V val)` Creates map with given values, adding a strict not-null check for value.
`static <T> IgnitePredicate<T>` `contains(Collection<T> c)` Provides predicate (not peer-deployable) which returns `true` if it receives an element that is contained in the passed in collection.
`static <T> IgnitePredicate<T>` `equalTo(T target)` Gets predicate (not perr-deployable) that evaluates to `true` if its free variable is equal to `target` or both are `null`.
`static <T> IgnitePredicate<T>` `in(Collection<? extends T> c)` Gets predicate (not peer-deployable) that returns `true` if its free variable is contained in given collection.
`static boolean` `isAllNodePredicates(IgnitePredicate<?>... ps)` Tests if all passed in predicates are instances of `GridNodePredicate` class.
`static boolean` `isAllNodePredicates(Iterable<? extends IgnitePredicate<?>> ps)` Tests if all passed in predicates are instances of `GridNodePredicate` class.
`static <T> IgnitePredicate<T>` `not(IgnitePredicate<? super T>... p)` Negates given predicates.
`static <T> IgnitePredicate<T>` `notContains(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.
`static <T> IgnitePredicate<T>` `notEqualTo(T target)` Gets predicate (not peer-deployable) that evaluates to `true` if its free variable is not equal to `target` or both are `null`.
`static <T> IgnitePredicate<T>` `notIn(Collection<? extends T> c)` Gets predicate (not peer-deployable) that returns `true` if its free variable is not contained in given collection.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### F0

    public F0()

### Method Detail

#### not

    public static <T> IgnitePredicate<T> not(@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
                               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`.

#### and0

    public static CacheEntryPredicate and0(@Nullable
                           CacheEntryPredicate[] p1,
                           @Nullable
                           CacheEntryPredicate... p2)

Parameters:
  `p1` - Filter1.
  `p2` - Filter2.
Returns:
  And filter.

#### and0

    public static CacheEntryPredicate and0(@Nullable
                           CacheEntryPredicate p,
                           @Nullable
                           CacheEntryPredicate... ps)

Parameters:
  `p` - Filter1.
  `ps` - Filter2.
Returns:
  And filter.

#### and

    public static <T> IgnitePredicate<T> and(@Nullable
                             IgnitePredicate<? super T>[] p1,
                             @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
                             IgnitePredicate<? super T> p,
                             @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
                            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
                                  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
                                     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
                              Iterable<? extends 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.

#### isAllNodePredicates

    public static boolean isAllNodePredicates(@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.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015