code: public void complete( T result, Object error ) {
          synchronized (this) {
              if ( isComplete ) {
                  throw new RuntimeException("Promise can be completed only once");
              }
              this.result = result;
              this.error = error;
              isComplete = true;
              tryFire();
          }
      }
docs: to be called by code returning an result or error.
  
  @param result
  @param error