public class BitMap extends Object
| Constructor and Description |
|---|
BitMap(int size)
Initialize a BitMap with given size.
|
BitMap(int size,
byte[] bits)
Initialize a BitMap with given size and bytes.
|
| Modifier and Type | Method and Description |
|---|---|
BitMap |
clone() |
static void |
copyOfRange(BitMap src,
int srcPos,
BitMap dest,
int destPos,
int length)
Copies a bitmap from the specified source bitmap, beginning at the specified position, to the
specified position of the destination bitmap.
|
boolean |
equals(Object obj) |
byte[] |
getByteArray() |
int |
getSize() |
int |
hashCode() |
boolean |
isAllMarked()
whether all bits are one, i.e., all are Null
|
boolean |
isAllUnmarked()
whether all bits are zero, i.e., no Null value
|
boolean |
isMarked(int position)
returns the value of the bit with the specified index.
|
void |
mark(int position)
mark as 1 at the given bit position.
|
void |
markAll()
mark as 1 at all positions.
|
void |
reset()
mark as 0 at all positions.
|
String |
toString() |
void |
unmark(int position) |
public BitMap(int size)
public BitMap(int size,
byte[] bits)
public byte[] getByteArray()
public int getSize()
public boolean isMarked(int position)
public void markAll()
public void mark(int position)
public void reset()
public void unmark(int position)
public boolean isAllUnmarked()
public boolean isAllMarked()
public static void copyOfRange(BitMap src, int srcPos, BitMap dest, int destPos, int length)
src - the source bitmap.srcPos - starting position in the source bitmap.dest - the destination bitmap.destPos - starting position in the destination bitmap.length - the number of bits to be copied.IndexOutOfBoundsException - if copying would cause access of data outside bitmap bounds.Copyright © 2022 The Apache Software Foundation. All rights reserved.