private static int toPosInt(Integer val) {
        return val == null ? 0 : Math.max(0, val.intValue());
    }
This class contains enough information about how a {@link com.yahoo.search.grouping.request.GroupingOperation} was
transformed into a list {@link com.yahoo.searchlib.aggregation.Grouping} objects, so that the results of those
queries can be transformed into something that corresponds to the original request.

@author Simon Thoresen Hult
container-search/src/main/java/com/yahoo/search/grouping/vespa/GroupingTransform.java