Two Laptop Bag
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "BitSet" Watch "BitSet" New topic


Supraja Kannaiyan
Ranch Hand

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

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

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

Joined: Apr 06, 2010
Posts: 4541

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.
Don't get me started about those stupid light bulbs.
subject: BitSet
jQuery in Action, 3rd edition