Class CompletedWork<T>

  • All Implemented Interfaces:
    Work<T>

    public final class CompletedWork<T>
    extends Object
    implements Work<T>
    • Constructor Detail

      • CompletedWork

        public CompletedWork​(T value)
    • Method Detail

      • process

        public boolean process()
        Description copied from interface: Work
        Call the method to do the work. The caller can keep calling this method until it returns true (i.e., the work is done).
        Specified by:
        process in interface Work<T>
        Returns:
        boolean to indicate if the work has finished.
      • getResult

        public T getResult()
        Description copied from interface: Work
        Get the result once the work is done.
        Specified by:
        getResult in interface Work<T>