org.apache.ignite.internal.util.lang

## Class IgniteClosureX<E,R>

- java.lang.Object
- - org.apache.ignite.internal.util.lang.IgniteClosureX<E,R>

All Implemented Interfaces:
  Serializable, IgniteClosure<E,R>

Direct Known Subclasses:
  CX1

    public abstract class IgniteClosureX<E,R>
    extends Object
    implements IgniteClosure<E,R>

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

See Also:
  `CX1`, Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgniteClosureX()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`R` `apply(E e)` Closure body.
`abstract R` `applyx(E e)` 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

#### IgniteClosureX

    public IgniteClosureX()

### Method Detail

#### apply

    public R apply(E e)

Closure body.

Specified by:
  `apply` in interface `IgniteClosure<E,R>`
Parameters:
  `e` - Closure parameter.
Returns:
  Closure return value.

#### applyx

    public abstract R applyx(E e)
                      throws IgniteCheckedException

Closure body that can throw `IgniteCheckedException`.

Parameters:
  `e` - The variable 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.5.0
Release Date | : May 23 2018