Meaningless Drivel is fun!
The moose likes Java in General and the fly likes BitSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "BitSet" Watch "BitSet" New topic


Supraja Kannaiyan
Ranch Hand

Joined: Mar 09, 2007
Posts: 42
Can somebody explain how the bitset works?

How to convert string(Values like AAAA) to BitSet?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46437
What did you learn when you read the BitSet(←link) documentation?
Matthew Brown

Joined: Apr 06, 2010
Posts: 4544

A BitSet maps integers to boolean values. It does this in a particularly efficient way (you could read Bit array for some of the theory behind it).

As such, I don't know what you mean by "convert a string to a bitmap". There's no natural correspondance between them, so you're going to have to define what the string means, and what the translation should mean.
I agree. Here's the link:
subject: BitSet
It's not a secret anymore!