public SpatialViewQuery limit(final int limit) {
        if (limit < 0) {
            throw new IllegalArgumentException("Limit must be >= 0.");
        }
        params[PARAM_LIMIT_OFFSET] = "limit";
        params[PARAM_LIMIT_OFFSET+1] = Integer.toString(limit);
        return this;
    }
public SpatialViewQuery limit ( final int limit ) { if ( limit < 0 ) { throw new IllegalArgumentException ( "Limit must be >= 0." ) ; } params [ PARAM_LIMIT_OFFSET ] = "limit" ; params [ PARAM_LIMIT_OFFSET + 1 ] = Integer . toString ( limit ) ; return this ; }
Limit the number of the returned documents to the specified number.

@param limit the number of documents to return.
@return the {@link SpatialViewQuery} object for proper chaining.