@Override
    public IPromise<T> onResult(Consumer<T> resultHandler) {
        return then( (r,e) -> {
            if ( e == null ) {
                resultHandler.accept((T) r);
            }
        });
    }
@ Override public IPromise < T > onResult ( Consumer < T > resultHandler ) { return then ( ( r , e ) -> { if ( e == null ) { resultHandler . accept ( ( T ) r ) ; } } ) ; }
see IPromise (inheriting Callback) interface