public static int calculateBitValue(BitSet bitSet) {
        int value = 0;
        for (int i = bitSet.nextSetBit(0); i >= 0; i = bitSet.nextSetBit(i + 1)) {
            value += i;
        }
        return value;
    }
Iterates through the bitset and adds every Bit, which is set to true, to a value.

@param bitSet The bitset.
mesh/src/main/java/no/nordicsemi/android/mesh/data/ScheduleEntry.java