public class Bitmap extends Object
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(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.
|
public Bitmap(DataInput is) throws IOException
is
- the input stream.IOException
- Description of the Exceptionpublic Bitmap()
public Bitmap(Bitmap master)
public boolean setBit(int num)
num
to 1.num
- The new bit valuepublic byte getBit(int num)
num
- the bit to checkpublic boolean isDirty()
public int getSets()
public void store(DataOutput os) throws IOException
os
- the output streamIOException
- Description of the Exceptionpublic IListReader getIListReader(String term)
term
- public long findNextSet(long from)
public long findNextUnset(long from)
Copyright © 2016 Egothor. All Rights Reserved.