@Override
    public IPromise<T> onTimeout(Consumer timeoutHandler) {
        return then( (r,e) -> {
            if ( e == Timeout.INSTANCE ) {
                timeoutHandler.accept(e);
            }
        });
    }
@ Override public IPromise < T > onTimeout ( Consumer timeoutHandler ) { return then ( ( r , e ) -> { if ( e == Timeout . INSTANCE ) { timeoutHandler . accept ( e ) ; } } ) ; }
see IPromise (inheriting Callback) interface