Spread a trailing array argument into the given number of arguments of
the type of the array.

@param count the new count of arguments to spread from the trailing array
@return a new Binder
964480
public Binder spread(int count) {
        if (count == 0) {
            return dropLast();
        }

        Class<?> aryType = type().parameterType(type().parameterCount() - 1);

        assert aryType.isArray();

        Class<?>[] spreadTypes = new Class[count];
        Arrays.fill(spreadTypes, aryType.getComponentType());

        return spread(spreadTypes);
    }
713811
public static <E> E nth(long count, Iterator<E> iterator) {
        final Iterator<E> filtered = new FilteringIterator<E>(iterator, new Nth<E>(count));
        return new FirstElement<E>().apply(filtered);
    }
1059214
public static <T> LazyIterable<T> take(Iterable<T> iterable, int count)
    {
        return new TakeIterable<T>(iterable, count);
    }
1111554
public void count(final Stat name, final int count) {
        Integer value = counters.get(name);
        value = value == null ? count : value + count;
        counters.put(name, value);
    }
860184
public void newarray(TypeMirror type, int count) throws IOException
    {
        if (type.getKind() != TypeKind.ARRAY)
        {
            throw new IllegalArgumentException(type+" is not array");
        }
        ArrayType at = (ArrayType) type;
        iconst(count);
        TypeMirror ct = at.getComponentType();
        switch (ct.getKind())
        {
            case BOOLEAN:
                newarray(T_BOOLEAN);
                break;
            case CHAR:
                newarray(T_CHAR);
                break;
            case FLOAT:
                newarray(T_FLOAT);
                break;
            case DOUBLE:
                newarray(T_DOUBLE);
                break;
            case BYTE:
                newarray(T_BYTE);
                break;
            case SHORT:
                newarray(T_SHORT);
                break;
            case INT:
                newarray(T_INT);
                break;
            case LONG:
                newarray(T_LONG);
                break;
            case DECLARED:
            {
                DeclaredType dt = (DeclaredType) ct;
                int index = subClass.resolveClassIndex((TypeElement)dt.asElement());
                anewarray(index);
            }
                break;
            default:
                throw new IllegalArgumentException(type+" not supported");
        }
    }
673143
public static InsnList pop(int count) {
        Validate.isTrue(count >= 0);
        InsnList ret = new InsnList();
        for (int i = 0; i < count; i++) {
            ret.add(new InsnNode(Opcodes.POP));
        }

        return ret;
    }
653182
public static String repeat(String s, int count) {
      if (s == null) {
         return null;
      }
      StringBuilder builder = new StringBuilder();
      for (int i = 0; i < count; i++) {
         builder.append(s);
      }
      return builder.toString();
   }
321894
public static /*@pure@*/ double info(int counts[]) {
    
    int total = 0;
    double x = 0;
    for (int j = 0; j < counts.length; j++) {
      x -= xlogx(counts[j]);
      total += counts[j];
    }
    return x + xlogx(total);
  }
309108
public static int arrayBindValueCount(Map<String, ParameterBindingDTO> bindValues)
  {
    if (!isArrayBind(bindValues))
    {
      return 0;
    }
    else
    {
      ParameterBindingDTO bindSample = bindValues.values().iterator().next();
      List<String> bindSampleValues = (List<String>) bindSample.getValue();
      return bindValues.size() * bindSampleValues.size();
    }
  }
982992
public static <T> Iterator<Pair<Integer, T>> counted(T... array) {
        dbc.precondition(array != null, "cannot call counted with a null array");
        final SequencingPolicy<Integer> sequencer = new NextIntegerSequencingPolicy();
        final Comparator<Optional<Integer>> comparator = new JustBeforeNothingComparator<Integer>(new ComparableComparator<Integer>());
        final Range<Integer> range = new DenseRange<Integer>(sequencer, comparator, Endpoint.Include, 0, Optional.of(Integer.MAX_VALUE), Endpoint.Include);
        return new ZipShortestIterator<Integer, T>(range.iterator(), new ArrayIterator<T>(array));
    }
1196194
public static Summary create(@Nullable Long count, @Nullable Double sum, Snapshot snapshot) {
    checkCountAndSum(count, sum);
    Utils.checkNotNull(snapshot, "snapshot");
    return new AutoValue_Summary(count, sum, snapshot);
  }
1010650
function(count, direction) {
      return direction ? this.concat(this.splice(0, count)) : this.splice(this.length - count).concat(this);
    }
178963
public static String s(int count) {
        StringBuilder result = new StringBuilder();

        for (int i = 0; i < count; i++) {
            result.append(" ");
        }
        return result.toString();
    }
641233
public static <T> T pickRandom (Iterator<T> iter, int count)
    {
        return pickRandom(iter, count, rand);
    }
716893
public int count(Pair<T> obj, int count) {
        if (count < 1)
            throw new IllegalArgumentException("Count must be positive: " + count);
        long index = getIndex(obj);
        int oldCount = counts.get(index);
        int newCount = count + oldCount;
        counts.put(index, newCount);
        sum += count;
        return newCount;
    }
1108263
public static DoubleStream buildRandomNumberStream(int count) {
        return IntStream.range(0, count).mapToDouble(i -> Math.random());
    }
164548
public function setOuterFilterColumnsCount($count)
	{
		if (!in_array($count, [1, 2, 3, 4, 6, 12], true)) {
			throw new \InvalidArgumentException(
				"Columns count must be one of following values: 1, 2, 3, 4, 6, 12. Value {$count} given."
			);
		}

		$this->outer_filter_columns_count = (int) $count;

		return $this;
	}