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

quark.PromiseFactory Maven / Gradle / Ivy

There is a newer version: 2.0.37
Show newest version
/* Quark 1.0.452 run at 2016-11-11 16:09:46.008093 */
package quark;

/**
 * Create Promises and input their initial value. Should typically only be used by Quark standard library.
 */
public class PromiseFactory implements io.datawire.quark.runtime.QObject {
    public static quark.reflect.Class quark_PromiseFactory_ref = datawire_mdk_md.Root.quark_PromiseFactory_md;
    public Promise promise = null;
    public PromiseFactory() {
        (this).promise = new Promise();
    }
    /**
     * Set the attached Promise's initial value.
     */
    public void resolve(Object result) {
        ((this).promise)._resolve(result);
    }
    /**
     * Set the attached Promise's initial value to an Error.
     */
    public void reject(quark.error.Error err) {
        ((this).promise)._reject(err);
    }
    public String _getClass() {
        return "quark.PromiseFactory";
    }
    public Object _getField(String name) {
        if ((name)==("promise") || ((Object)(name) != null && ((Object) (name)).equals("promise"))) {
            return (this).promise;
        }
        return null;
    }
    public void _setField(String name, Object value) {
        if ((name)==("promise") || ((Object)(name) != null && ((Object) (name)).equals("promise"))) {
            (this).promise = (Promise) (value);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy