code: public static <T, P> AsyncCallback<T> map (AsyncCallback<P> target, final Function<T, P> f)
      {
          return new ChainedCallback<T, P>(target) {
              @Override public void onSuccess (T result) {
                  forwardSuccess(f.apply(result));
              }
          };
      }
docs: Creates a chained callback that maps the result using the supplied function and passes the
  mapped result to the target callback.