public static AddFunction newInstance(List<GroupingExpression> args) {
        if (args.size() < 2) {
            throw new IllegalArgumentException("Expected 2 or more arguments, got " + args.size() + ".");
        }
        return new AddFunction(null, null, args);
    }
Constructs a new instance of this class from a list of arguments.

@param args the arguments to pass to the constructor.
@return the created instance.
@throws IllegalArgumentException thrown if the number of arguments is less than 2.
container-search/src/main/java/com/yahoo/search/grouping/request/AddFunction.java