|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.egothor.util.Bitmap
public class Bitmap
The Bitmap object is an implementation of a bit map. Bitmap can be used for setting bits, getting states of bits. It can also be stored or loaded from a data stream.
This implementation divides the entire bit map into smaller blocks. If the block does not contain any 1-bits (the default, initial state) it is not stored in this object.
Constructor Summary | |
---|---|
Bitmap()
The default constructor for the Bitmap object. |
|
Bitmap(Bitmap master)
Create a copy of the master. |
|
Bitmap(DataInput is)
Construct a Bitmap object using the given input stream. |
Method Summary | |
---|---|
Bitmap |
and(Bitmap with)
|
long |
findNextSet(long from)
Return the next bit set starting at the bit of index from. |
long |
findNextUnset(long from)
Return the next bit unset starting at the bit of index from. |
byte |
getBit(int num)
Return the state of the specified bit (the first bit is 0). |
IListReader |
getIListReader(java.lang.String term)
|
int |
getSets()
Returns the total number of 1-bits in the bit map. |
boolean |
isDirty()
Test whether the Bitmap has been modified. |
Bitmap |
or(Bitmap with)
|
boolean |
setBit(int num)
Set the bit at index num to 1. |
void |
store(DataOutput os)
Write this object to the given output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Bitmap(DataInput is) throws java.io.IOException
is
- the input stream.
java.io.IOException
- Description of the Exceptionpublic Bitmap()
public Bitmap(Bitmap master)
Method Detail |
---|
public boolean setBit(int num)
num
to 1.
num
- The new bit valuepublic Bitmap and(Bitmap with)
public Bitmap or(Bitmap with)
public byte getBit(int num)
num
- the bit to check
public boolean isDirty()
public int getSets()
public void store(DataOutput os) throws java.io.IOException
os
- the output stream
java.io.IOException
- Description of the Exceptionpublic IListReader getIListReader(java.lang.String term)
public long findNextSet(long from)
public long findNextUnset(long from)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |