ur_rna.StructureEditor.services.fileIO

## Class RnaFileIO.BackgroundWork<TResult>

- java.lang.Object
- - ur_rna.StructureEditor.services.fileIO.RnaFileIO.BackgroundWork<TResult>

- All Implemented Interfaces:
    RnaFileIO.AsyncTask<TResult>
  Direct Known Subclasses:
    RnaFileIO.BackendCalc
  Enclosing class:
    RnaFileIO

      public abstract static class RnaFileIO.BackgroundWork<TResult>
      extends java.lang.Object
      implements RnaFileIO.AsyncTask<TResult>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `_canCancel`
    `protected java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>>` | `_complete`
    `(package private) java.lang.Exception` | `_err`
    `protected boolean` | `_isCanceled`
    `protected boolean` | `_isDone`
    `protected int` | `_progress`
    `protected TResult` | `_result`
    `(package private) java.lang.String` | `_status`
    `protected java.lang.Object` | `_tag`
    `protected java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>>` | `_update`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackgroundWork()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract TResult` | `calcResult()`
    `boolean` | `canCancel()`
    `void` | `cancel()`
    `java.lang.Exception` | `getError()`
    `int` | `getProgress()`
    `TResult` | `getResult()`
    `java.lang.String` | `getStatus()`
    `java.lang.Object` | `getTag()`
    `boolean` | `isCanceled()`
    `boolean` | `isDone()`
    `protected void` | `notifyUpdate()`
    `void` | `onUpdate(java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>> actionOnUpdate)`
    `protected void` | `setError(java.lang.Exception ex)`
    `protected void` | `setError(java.lang.String message)`
    `void` | `start()`
    `protected void` | `update(int progress)`
    `protected void` | `update(int progress, java.lang.String status)`
    `void` | `whenDone(java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>> actionOnComplete)`

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

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

    - ### Methods inherited from interface ur_rna.StructureEditor.services.fileIO.RnaFileIO.AsyncTask

      `hadError`

- - ### Field Detail

    - #### _canCancel

          protected boolean _canCancel

    - #### _complete

          protected java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>> _complete

    - #### _err

          java.lang.Exception _err

    - #### _isCanceled

          protected boolean _isCanceled

    - #### _isDone

          protected boolean _isDone

    - #### _progress

          protected int _progress

    - #### _result

          protected TResult _result

    - #### _status

          java.lang.String _status

    - #### _tag

          protected java.lang.Object _tag

    - #### _update

          protected java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>> _update

  - ### Constructor Detail

    - #### BackgroundWork

          public BackgroundWork()

  - ### Method Detail

    - #### calcResult

          protected abstract TResult calcResult()
                                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### canCancel

          public boolean canCancel()

      Specified by:
        `canCancel` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### cancel

          public void cancel()

      Specified by:
        `cancel` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### getError

          public java.lang.Exception getError()

      Specified by:
        `getError` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### getProgress

          public int getProgress()

      Specified by:
        `getProgress` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### getResult

          public TResult getResult()

      Specified by:
        `getResult` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### getStatus

          public java.lang.String getStatus()

      Specified by:
        `getStatus` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### getTag

          public java.lang.Object getTag()

      Specified by:
        `getTag` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### isCanceled

          public boolean isCanceled()

      Specified by:
        `isCanceled` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### isDone

          public boolean isDone()

      Specified by:
        `isDone` in interface `RnaFileIO.AsyncTask<TResult>`

    - #### notifyUpdate

          protected void notifyUpdate()

    - #### onUpdate

          public void onUpdate(java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>> actionOnUpdate)

    - #### setError

          protected void setError(java.lang.Exception ex)

    - #### setError

          protected void setError(java.lang.String message)

    - #### start

          public void start()

    - #### update

          protected void update(int progress)

    - #### update

          protected void update(int progress,
                                java.lang.String status)

    - #### whenDone

          public void whenDone(java.util.function.Consumer<? super RnaFileIO.BackgroundWork<TResult>> actionOnComplete)