class Builder {

        /**
         * Utility constructor.
         */
        Builder() {
        }

        /**
         * Creates new {@link ZAggregateArgs} setting {@literal WEIGHTS}.
         *
         * @return new {@link ZAddArgs} with {@literal WEIGHTS} set.
         * @see ZAggregateArgs#weights(double...)
         */
        public static ZAggregateArgs weights(double... weights) {
            return new ZAggregateArgs().weights(weights);
        }

        /**
         * Creates new {@link ZAggregateArgs} setting {@literal AGGREGATE SUM}.
         *
         * @return new {@link ZAddArgs} with {@literal AGGREGATE SUM} set.
         * @see ZAggregateArgs#sum()
         */
        public static ZAggregateArgs sum() {
            return new ZAggregateArgs().sum();
        }

        /**
         * Creates new {@link ZAggregateArgs} setting {@literal AGGREGATE MIN}.
         *
         * @return new {@link ZAddArgs} with {@literal AGGREGATE MIN} set.
         * @see ZAggregateArgs#sum()
         */
        public static ZAggregateArgs min() {
            return new ZAggregateArgs().min();
        }

        /**
         * Creates new {@link ZAggregateArgs} setting {@literal AGGREGATE MAX}.
         *
         * @return new {@link ZAddArgs} with {@literal AGGREGATE MAX} set.
         * @see ZAggregateArgs#sum()
         */
        public static ZAggregateArgs max() {
            return new ZAggregateArgs().max();
        }

    }

    /**
     * Specify a multiplication factor for each input sorted set.
     *
     * @param weights must not be {@code null}.
     * @return {@code this} {@link ZAggregateArgs}.
     */
    public ZAggregateArgs weights(double... weights) {<FILL_FUNCTION_BODY>


        LettuceAssert.notNull(weights, "Weights must not be null");

        this.weights = new ArrayList<>(weights.length);

        for (double weight : weights) {
            this.weights.add(weight);
        }
        return this;
    
<no_super_class>