src/main/java/com/googlecode/javaewah/datastructure/ImmutableBitSet.java
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;
  }
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;
  }
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 ; }
Compute the number of bits set to 1

@return the number of bits
Compute the number of bits set to 1