private static SortedSet<Integer> buildPositionList(final List<Boolean> perm) {
        final SortedSet<Integer> tagPositions = new TreeSet<>();

        if (perm != null) {
            int pos = 0;
            for (final Boolean val : perm) {
                if (val) {
                    tagPositions.add(pos);
                }
                pos++;
            }
        }
        return tagPositions;
    }
Converts a list that looks like [true,false,true] to a list of positions
of true values, i.e. [0,2]
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/rollup/RollUpBitMask.java