Limit the number of mappings - only this number of mappings will be
generate.

@param limit the number of mappings
@return fluent-api instance
7418
public Mappings limit(int limit) {
        return new Mappings(query, target, Iterables.limit(iterable, limit));
    }
1231621
private void _buildLimit(
                    final Limit limit,
                    final StringBuilder stmt
                    )
    {
        if (limit == null) {
            return;
        }

        stmt.append( _LIMIT_ );
        stmt.append( limit.getCount() );
        stmt.append( _OFFSET_ );
        stmt.append( limit.getOffset() );
    }
753452
def limit(self, limit):
        
        query = self._copy()
        query._limit = limit
        return query
1079486
public function withLimit(int $limit): self
    {
        $paginator = clone $this;
        $paginator->limit = $limit;

        return $paginator;
    }
1359917
public function limit($limit)
    {
        if ($this->queryType !== self::QUERY_SELECT) {
            $this->exception = new QueryException("Limit can only be applied on SELECT mode!", 0, $this->exception);
            return $this;
        }
        if (! is_int($limit) || $limit < 0) {
            $this->exception = new QueryException("Limit value should be an positive integer!", 0, $this->exception);
            return $this;
        }
        $this->limitCount = intval($limit);

        return $this;
    }
748430
public function limit(int $limit, $offset=FALSE): QueryBuilderInterface
	{
		$this->state->setLimit($limit);
		$this->state->setOffset($offset);

		return $this;
	}
213056
public function limit($limit) : QueryBuilder
    {
        $this->_query[] = "LIMIT";

        if(is_array($limit)) {
            $this->_query[] = $this->getQuoted($limit[0]).",";
            $this->_query[] = $this->getQuoted($limit[1]);

            return $this;
        }

        $this->_query[] = $this->getQuoted($limit);

        return $this;
    }
1253688
public int setRecursionLimit(final int limit) {
    if (limit < 0) {
      throw new IllegalArgumentException(
        "Recursion limit cannot be negative: " + limit);
    }
    final int oldLimit = recursionLimit;
    recursionLimit = limit;
    return oldLimit;
  }
1053959
public BDD restrict(final Collection<Literal> restriction) {
    final BDD resBDD = this.factory.build(this.factory.getF().and(restriction));
    return new BDD(this.factory.underlyingKernel().restrict(index(), resBDD.index()), this.factory);
  }
267061
@Override
	public SqlEntityQuery<E> limit(final long limit) {
		if (!agent().getSqlConfig().getDialect().supportsLimitClause()) {
			throw new UroborosqlRuntimeException("Unsupported limit clause.");
		}
		this.limit = limit;
		return this;
	}
732283
public static Collection map(Mapper mapper, Enumeration en, boolean allowNull) {
        ArrayList l = new ArrayList();
        while (en.hasMoreElements()) {
            Object o = mapper.map(en.nextElement());
            if (allowNull || o != null) {
                l.add(o);
            }
        }
        return l;
    }
349508
function createQueryWithLimit() {
            // We query only limit number in case of big table
            // If we query with more than million data query will hang up
            const query = _this.initQuery(namespace);
            if (ancestors) {
                query.hasAncestor(_this.gstore.ds.key(ancestors.slice()));
            }
            query.select('__key__');
            query.limit(limitDataPerQuery);

            return query;
        }
144466
public function limit($limit, $offset = NULL)
	{
		$this->emptyResult();

		$this->queryBuilder->limit($limit, $offset);
		return $this;
	}
800939
@Override
    public List<Metric> filter(Map<Metric, String> extendedSortedMap, String limit) {
        SystemAssert.requireArgument(extendedSortedMap != null && !extendedSortedMap.isEmpty(), "New map is not constructed successfully!");
        SystemAssert.requireArgument(limit != null && !limit.equals(""), "Limit must be provided!");

        List<Metric> result = new ArrayList<Metric>();

        for (Map.Entry<Metric, String> entry : extendedSortedMap.entrySet()) {
            if (Double.parseDouble(limit) > Double.parseDouble(entry.getValue())) {
                result.add(entry.getKey());
            }
        }
        return result;
    }
648240
public static String genLimitSQL(Integer offset, Integer limit) {
		StringBuilder sb = new StringBuilder();
		if (limit != null) {
			sb.append(" limit ");
			if(offset != null) {
				sb.append(offset).append(",");
			}
			sb.append(limit);
		}
		return sb.toString();
	}
972974
public function limit($limit, $start = null)
    {
        if(is_int($limit)) {
            $build = $limit;
            if(is_int($start)) {
                $build = $start.', '.$limit;
            }
            $this->limit = ' LIMIT '.$build;
        }
        return $this;
    }
603303
public static List<Integer> randomizeWithinLimit(int limit) {
        List<Integer> list = new ArrayList<Integer>(limit);
        for (int i = 0; i < limit; i++) {
            list.add(i);
        }
        Collections.shuffle(list, new Random());
        return list;
    }