Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
1.0.0, 1.1.0
-
None
-
None
Description
BitSet has a constructor parameter named "numBits: Int" and indicate the bit num inside.
And also, there is a function called "capacity" which represents the long words number to hold the bits.
When creating new BitSet,for example in '|', I thought the new created one shouldn't be the size of longer words' length, instead, it should be the longer set's num of bit
def |(other: BitSet): BitSet = { val newBS = new BitSet(math.max(numBits, other.numBits)) // I know by now the numBits isn't a field
Does it have any other reason to expand the BitSet range I don't know?