org.apache.ignite.internal.visor

## Class VisorEither<T>

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorEither<T>

Type Parameters:
  `T` - Result type.

All Implemented Interfaces:
  Externalizable, Serializable

    public class VisorEither<T>
    extends Object
    implements Externalizable

Base class for Visor result with error.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`VisorEither()` Default constructor.
`VisorEither(T res)`
`VisorEither(Throwable error)`

### Method Summary

Methods
`boolean` `failed()`
`Throwable` `getError()`
`T` `getResult()`
`void` `readExternal(ObjectInput in)`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### VisorEither

    public VisorEither()

Default constructor.

#### VisorEither

    public VisorEither(Throwable error)

Parameters:
  `error` - Exception on execution.

#### VisorEither

    public VisorEither(T res)

Parameters:
  `res` - Result.

### Method Detail

#### failed

    public boolean failed()

Returns:
  `true` If failed on execution.

#### getError

    public Throwable getError()

Returns:
  Exception on execution.

#### getResult

    public T getResult()

Returns:
  Result.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017