public void push(Type type, GroupingExpression exp) {
        if (items.isEmpty() && type != Type.ADD) {
            throw new IllegalArgumentException("First item in an arithmetic operation must be an addition.");
        }
        items.add(new Item(type, exp));
    }
Pushes the given operator-expression pair onto this math resolver. Once all pairs have been pushed using this
method, call {@link #resolve()} to retrieve to combined grouping expression.

@param type The operator that appears before the expression being pushed.
@param exp  The expression to push.
container-search/src/main/java/com/yahoo/search/grouping/request/MathResolver.java