All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.html.lib.angular.IPromise Maven / Gradle / Ivy

package net.java.html.lib.angular;
public class IPromise extends net.java.html.lib.Objs {
  protected IPromise(net.java.html.lib.Objs.Constructor c, java.lang.Object js) {
    super(c, js);
  }
  private static final class $Constructor extends net.java.html.lib.Objs.Constructor {
    $Constructor() {
      super(IPromise.class);
    }
    @Override
    public IPromise create(java.lang.Object obj) {
      return obj == null ? null : new IPromise(this, obj);
    }
  };
  private static final $Constructor $AS = new $Constructor();
  public static IPromise $as(java.lang.Object obj) {
    return $AS.create(obj);
  }
  /**
  * Shorthand for promise.then(null, errorCallback)
  */
  /* cannot generate catch */
  /**
  * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
  *
  * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
  */
  /* cannot generate finally */
  /**
  * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
  * The successCallBack may return IPromise for when a $q.reject() needs to be returned
  * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
  */
  public  IPromise then(net.java.html.lib.Function.A1,TResult>> successCallback, net.java.html.lib.Function.A1 errorCallback, net.java.html.lib.Function.A1 notifyCallback) {
    return (IPromise)net.java.html.lib.angular.IPromise.$as($Typings$.then$342($js(this), net.java.html.lib.Objs.$js(net.java.html.lib.Function.newFunction(successCallback, new Class[] {null})), net.java.html.lib.Objs.$js(net.java.html.lib.Function.newFunction(errorCallback, new Class[] {java.lang.Object.class})), net.java.html.lib.Objs.$js(net.java.html.lib.Function.newFunction(notifyCallback, new Class[] {java.lang.Object.class}))));
  }
  /**
  * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
  * The successCallBack may return IPromise for when a $q.reject() needs to be returned
  * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
  */
  public  IPromise then(net.java.html.lib.Function.A1,TResult>> successCallback) {
    return (IPromise)net.java.html.lib.angular.IPromise.$as($Typings$.then$343($js(this), net.java.html.lib.Objs.$js(net.java.html.lib.Function.newFunction(successCallback, new Class[] {null}))));
  }
  /**
  * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
  * The successCallBack may return IPromise for when a $q.reject() needs to be returned
  * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
  */
  public  IPromise then(net.java.html.lib.Function.A1,TResult>> successCallback, net.java.html.lib.Function.A1 errorCallback) {
    return (IPromise)net.java.html.lib.angular.IPromise.$as($Typings$.then$344($js(this), net.java.html.lib.Objs.$js(net.java.html.lib.Function.newFunction(successCallback, new Class[] {null})), net.java.html.lib.Objs.$js(net.java.html.lib.Function.newFunction(errorCallback, new Class[] {java.lang.Object.class}))));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy