org.apache.ignite.internal.util.lang

## Class IgniteClosure2X<E1,E2,R>

- java.lang.Object
- - org.apache.ignite.internal.util.lang.IgniteClosure2X<E1,E2,R>

All Implemented Interfaces:
  Serializable, IgniteBiClosure<E1,E2,R>

Direct Known Subclasses:
  CX2

    public abstract class IgniteClosure2X<E1,E2,R>
    extends Object
    implements IgniteBiClosure<E1,E2,R>

Convenient closure subclass that allows for thrown grid exception. This class implements `apply(Object, Object)` method that calls `applyx(Object, Object)` method and properly wraps `IgniteCheckedException` into `GridClosureException` instance.

See Also:
  `CX2`, Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgniteClosure2X()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`R` `apply(E1 e1, E2 e2)` Closure body.
`abstract R` `applyx(E1 e1, E2 e2)` Closure body that can throw `IgniteCheckedException`.

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

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

### Constructor Detail

#### IgniteClosure2X

    public IgniteClosure2X()

### Method Detail

#### apply

    public R apply(E1 e1,
                   E2 e2)

Closure body.

Specified by:
  `apply` in interface `IgniteBiClosure<E1,E2,R>`
Parameters:
  `e1` - First parameter.
  `e2` - Second parameter.
Returns:
  Closure return value.

#### applyx

    public abstract R applyx(E1 e1,
                             E2 e2)
                      throws IgniteCheckedException

Closure body that can throw `IgniteCheckedException`.

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.
Returns:
  Optional return value.
Throws:
  `IgniteCheckedException` - Thrown in case of any error condition inside of the closure.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018