code: public int cardinality() {
        int sum = 0;
        int length = this.data.limit();
        for(int k = 0; k < length; ++k)
            sum += Long.bitCount(this.data.get(k));
        return sum;
    }
docs: Compute the number of bits set to 1
  
  @return the number of bits