Set the collection size range.

@param minCollectionSize the minimum collection size
@param maxCollectionSize the maximum collection size
@return the current {@link EasyRandomParameters} instance for method chaining
323919
public EasyRandomParameters collectionSizeRange(final int minCollectionSize, final int maxCollectionSize) {
        if (minCollectionSize < 0) {
            throw new IllegalArgumentException("minCollectionSize must be >= 0");
        }
        if (minCollectionSize > maxCollectionSize) {
            throw new IllegalArgumentException(format("minCollectionSize (%s) must be <= than maxCollectionSize (%s)",
                    minCollectionSize, maxCollectionSize));
        }
        setCollectionSizeRange(new Range<>(minCollectionSize, maxCollectionSize));
        return this;
    }
1066561
public void setChaincodeCollectionConfiguration(ChaincodeCollectionConfiguration collectionConfigPackage) throws InvalidArgumentException {
        if (null == collectionConfigPackage) {
            throw new InvalidArgumentException("The parameter collectionConfigPackage may not be null.");
        }

        this.collectionConfigPackage = collectionConfigPackage.getCollectionConfigPackage();
    }
967007
public void setRange( int dimension , double min , double max ) {
		valueMin[dimension] = min;
		valueMax[dimension] = max;
	}
1371400
protected function setMinSize($minSize)
    {
        $this->minSize = $this->toBytes($minSize);
        $this->minSizeString = $this->fromBytes($this->minSize);
        return $this;
    }
523393
@Override
    public boolean addAll(@NonNull Collection<? extends E> collection) {
        final int size = collection.size();
        if (size > maxSize) {
            collection = new ArrayList<>(collection).subList(size - maxSize, size);
        }
        final int overhead = size() + collection.size() - maxSize;
        if (overhead > 0) {
            removeRange(0, overhead);
        }
        return super.addAll(collection);
    }
1328008
public static <T> Collector<T, ?, Optional<T>> max(Comparator<? super T> comparator) {
        return maxBy(t -> t, comparator);
    }
1041862
public LongParameter setMaximumValue(long maximumValue) {
		if (hasMinimumValue) {
			Util.checkParameter(maximumValue >= minimumValue,
				"Maximum value (" + maximumValue + ") must be greater than or equal to minimum (" + minimumValue + ")");
		}

		this.hasMaximumValue = true;
		this.maximumValue = maximumValue;

		return this;
	}
912628
public static Range range(final double minValue, final double maxValue) {
        if (minValue > maxValue) {
            throw new IllegalArgumentException("minValue should be less then or equal to maxValue (" + minValue+ ", " + maxValue + ")");
        }
        return new Range() {

            @Override
            public Number getMinimum() {
                return minValue;
            }

            @Override
            public Number getMaximum() {
                return maxValue;
            }

            @Override
            public String toString() {
                return Ranges.toString(this);
            }
            
        };
    }
257016
private void setColumnsSize(final double min, final double max, final String... columnPropertyIds) {
        for (final String columnPropertyId : columnPropertyIds) {
            getColumn(columnPropertyId).setMinimumWidth(min);
            getColumn(columnPropertyId).setMaximumWidth(max);
        }
    }
126153
protected function withSize(int $maxSize): AbstractPool
	{
		if ($maxSize <= 0) {
			throw new \InvalidArgumentException(PoolException::ERROR_INVALID_POOL_SIZE);
		}
		$this->maxSize = $maxSize;
		
		return $this;
	}
751312
public static final int nextInteger(int min, int max) {
		return min == max ? min : min + getRandom().nextInt(max - min);
	}
1154058
public static <T, Y extends Comparable<Y>> Collector<T, ?, Optional<T>> maxBy(Function<T, Y> projection) {
        return maxBy(projection, Comparable::compareTo);
    }
910887
public static synchronized void init(long maxSize) throws Exception {
        mContext = QuickUtils.getContext();
        mMaxSize = maxSize;
        cache = SimpleDiskCache.open(mContext.getFilesDir(), 1, mMaxSize);
    }
503202
public ValidatorBuilderDouble<PARENT> range(double min, double max) {

    return range(new Range<>(Double.valueOf(min), Double.valueOf(max)));
  }
608271
@SuppressFBWarnings(value = "IM_BAD_CHECK_FOR_ODD", justification = "It's obvious that groupSize is not negative.")
    public CPSubsystemConfig setGroupSize(int groupSize) {
        checkTrue(groupSize == 0 || (groupSize >= MIN_GROUP_SIZE && groupSize <= MAX_GROUP_SIZE
                && (groupSize % 2 == 1)), "Group size must be an odd value between 3 and 7");
        this.groupSize = groupSize;
        return this;
    }
156590
public HttpServerExchange setMaxEntitySize(final long maxEntitySize) {
        if (!isRequestChannelAvailable()) {
            throw UndertowMessages.MESSAGES.requestChannelAlreadyProvided();
        }
        this.maxEntitySize = maxEntitySize;
        connection.maxEntitySizeUpdated(this);
        return this;
    }
1360381
@Factory
    public static <E> Matcher<? super Collection<? extends E>> hasSize(Matcher<? super Integer> size) {
        return new IsCollectionWithSize<E>(size);
    }