public static Observable<AsyncViewResult> mapToViewResult(final AsyncBucket bucket, final ViewQuery query,
        final ViewQueryResponse response) {

        return response
            .info()
            .singleOrDefault(null)
            .map(new ByteBufToJsonObject())
            .map(new BuildViewResult(bucket, query, response));
    }
public static Observable < AsyncViewResult > mapToViewResult ( final AsyncBucket bucket , final ViewQuery query , final ViewQueryResponse response ) { return response . info ( ) . singleOrDefault ( null ) . map ( new ByteBufToJsonObject ( ) ) . map ( new BuildViewResult ( bucket , query , response ) ) ; }
Maps a raw {@link ViewQueryResponse} into a {@link AsyncViewResult}.

@param bucket reference to the bucket.
@param query the original query object.
@param response the response from the server.
@return a converted {@link AsyncViewResult}.