code: public static List<Long> indexes(final MutableBitSet bits) {
          List<Long> indexes = new ArrayList<>((int) bits.cardinality());
          
          for (long i = bits.nextSetBit(0); i >= 0; i = bits.nextSetBit(i + 1)) {
              indexes.add(i);
          }
          
          return indexes;
      }
docs: Get the indexes of a bitset.
  @param bits parameter
  @return list of set bits