Package com.microblink.blinkid.activity.result

# Class BaseScanResult<T>

java.lang.Object
com.microblink.blinkid.activity.result.BaseScanResult<T>

Direct Known Subclasses:
  `OneSideScanResult`, `ScanResult`, `TwoSideScanResult`

public abstract class BaseScanResult<T> extends Object
Result of the scanning process. You should first check the result status by using the `getResultStatus()`. If it is `ResultStatus.FINISHED`, data will be available in the returned `BaseScanResult` data object, otherwise it will be `null`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseScanResult(ResultStatus resultStatus, T result, Throwable exception)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Throwable`
  `getException()`
  Returns scanning exception if result status is `ResultStatus.EXCEPTION`.
  `T`
  `getResult()`
  Returns scanned data if result status is `ResultStatus.FINISHED`.
  `ResultStatus`
  `getResultStatus()`
  Returns the status of the scanning process.

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

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

- ## Constructor Details

  - ### BaseScanResult

    public BaseScanResult(ResultStatus resultStatus, T result, Throwable exception)

- ## Method Details

  - ### getResultStatus

    public ResultStatus getResultStatus()
    Returns the status of the scanning process. See explanation for each `ResultStatus`.
    Returns:
      the status of the scanning process.

  - ### getResult

    @Nullable public T getResult()
    Returns scanned data if result status is `ResultStatus.FINISHED`.
    Returns:
      scanned data if result status is `ResultStatus.FINISHED`, or `null` otherwise.

  - ### getException

    @Nullable public Throwable getException()
    Returns scanning exception if result status is `ResultStatus.EXCEPTION`.
    Returns:
      scanning exception if result status is `ResultStatus.EXCEPTION`, or `null` otherwise.