wood burning stoves 2.0*
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


JavaRanch » Java Forums » Java » Java in General
Bookmark "BitSet" Watch "BitSet" New topic
Author

BitSet

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
Sheriff

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

Joined: Apr 06, 2010
Posts: 4397
    
    8

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.
 
GeeCON Prague 2014
 
subject: BitSet