Interface GridPredicate3<E1,​E2,​E3>

  • Type Parameters:
    E1 - Type of the first free variable, i.e. the element the closure is called on.
    E2 - Type of the second free variable, i.e. the element the closure is called on.
    E3 - Type of the third free variable, i.e. the element the closure is called on.
    All Known Subinterfaces:
    P3<T1,​T2,​T3>
    All Known Implementing Classes:
    GridPredicate3X, PX3

    public interface GridPredicate3<E1,​E2,​E3>
    Defines predicate construct. Predicate like closure is a first-class function that is defined with (or closed over) its free variables that are bound to the closure scope at execution.

    This form of predicate is essentially a syntactic "sugar" providing shorter syntax for:

     ...
     GridPredicate<GridTuple3<E1, E2, E3>>
     ...
     

    Type Alias

    To provide for more terse code you can use a typedef P3 class or various factory methods in GridFunc class. Note, however, that since typedefs in Java rely on inheritance you should not use these type aliases in signatures.

    Thread Safety

    Note that this interface does not impose or assume any specific thread-safety by its implementations. Each implementation can elect what type of thread-safety it provides, if any.
    See Also:
    P3, GridFunc
    • Method Detail

      • apply

        boolean apply​(E1 e1,
                      E2 e2,
                      E3 e3)
        Predicate body.
        Parameters:
        e1 - First bound free variable, i.e. the element the closure is called or closed on.
        e2 - Second bound free variable, i.e. the element the closure is called or closed on.
        e3 - Third bound free variable, i.e. the element the closure is called or closed on.
        Returns:
        Return value.