public static RollUpBitMask fromSortedTagList(final List<StatisticTag> tags) {
        final SortedSet<Integer> tagPositions = new TreeSet<>();
        int pos = 0;
        if (tags != null) {
            for (final StatisticTag tag : tags) {
                if (RollUpBitMask.ROLL_UP_TAG_VALUE.equals(tag.getValue())) {
                    tagPositions.add(pos);
                }
                pos++;
            }
        }
        return RollUpBitMask.fromTagPositions(tagPositions);
    }
Builds a {@link RollUpBitMask} object from a list of StatisticTags where
the tag's value is either a value or '*' (to mark a roll up). The passed
list MUST be ordered by tag name as the positions of the tags in the list
directly relate to the bit mask positions.

@param tags A list of {@link StatisticTag} objects ordered by their tag
            name
@return A new {@link RollUpBitMask} object
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/rollup/RollUpBitMaskUtil.java