Name: tb29552 Date: 09/22/97
motivation for first 3 problems:
I had a need to subtract one BitSet x from BitSet y.
This is equivalant to x & !y.
1.
problem: BitSet does not have a method "not".
work-around: Use "xor" with a BitSet containing 1's.
2.
problem: BitSet is "final".
Therefore I could not define my own BitSet method, minus(BitSet y).
work-around: Create a method, minus(BitSet x, BitSet y), in an unrelated
class.
3.
not really a problem: Enumeration is not provided with BitSets
work-around: Use the following loop, for (int i=0; i<bitset.size(); i++)
4.
problem: Want to enumerate a group of items without making a copy
of the group.
work-around: create a non-standard method to reset those variables
used in the enumeration functions
example: setting i=0 to go thru a BitSet again.
======================================================================
- relates to
-
JDK-4176262 java.util.BitSet bulk set or clear
-
- Resolved
-