java.util.BitSet simulates bit strings longer than 64 bits using an internal array of longs. Normally you would use a primitive long for a BitSet <= 64 bits long or an int for a BitSet <= 32 bits long.
BitSet supports and, or, xor, andNot and clear. It does not have a shift, but you can copy bits, one at a time with get/set.
Two other techniques for dealing with sets include HashSet and EnumSet.
|
|
available on the web at: |
http://mindprod.com/jgloss/bitset.html |
optional Replicator mirror
|
J:\mindprod\jgloss\bitset.html | |
![]() |
Please email your
feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear
wording, broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Blog | Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[107.22.127.92] |
|
| Feedback | You are visitor number 5,957. | |