Public Member Functions | |
BitString (int initialSize) | |
Create a new BitString with the given size. | |
boolean | valueAt (int index) |
Bit value at the given index. | |
void | add (boolean value) |
Add a bit. | |
void | fill (boolean v) |
Fill with the given value. | |
void | fill (boolean v, int offset, int size) |
void | setValue (int id, boolean v) |
String | toString () |
BitString to string. | |
BitString | concat (BitString b) |
int | size () |
Taille du BitString. | |
Static Public Member Functions | |
static BitString | convert (String s) |
Convertir un string sous la forme {0,1}+ en BitString. | |
static BitString | convert (char c) |
static BitString | convert (int i) |
static BitString | convert (byte b) |
static void | main (String[] args) |
Protected Attributes | |
ByteBuffer | buffer |
Buffer storing data. | |
Static Protected Attributes | |
static final byte | BIT_0 = (byte) Integer.parseInt( "10000000", 2 ) |
Bit 0 mask. | |
static final byte | BIT_1 = (byte) Integer.parseInt( "01000000", 2 ) |
Bit 1 mask. | |
static final byte | BIT_2 = (byte) Integer.parseInt( "00100000", 2 ) |
Bit 2 mask. | |
static final byte | BIT_3 = (byte) Integer.parseInt( "00010000", 2 ) |
Bit 3 mask. | |
static final byte | BIT_4 = (byte) Integer.parseInt( "00001000", 2 ) |
Bit 4 mask. | |
static final byte | BIT_5 = (byte) Integer.parseInt( "00000100", 2 ) |
Bit 5 mask. | |
static final byte | BIT_6 = (byte) Integer.parseInt( "00000010", 2 ) |
Bit 6 mask. | |
static final byte | BIT_7 = (byte) Integer.parseInt( "00000001", 2 ) |
Bit 7 mask. | |
static final byte[] | BITS = { BIT_0, BIT_1, BIT_2, BIT_3, BIT_4, BIT_5, BIT_6, BIT_7 } |
Set of all masks. |
This object can be used to stock a big amount of boolean.
boolean org.miv.jism.tools.BitString.valueAt | ( | int | index | ) |
Bit value at the given index.
index | bit index |
void org.miv.jism.tools.BitString.add | ( | boolean | value | ) |
Add a bit.
value | bit value |
ByteBuffer org.miv.jism.tools.BitString.buffer [protected] |
Buffer storing data.