public class CompleteBitField extends BitField
| Constructor and Description |
|---|
CompleteBitField(int size)Creates a new CompleteBitField that represents size set bits. |
| Modifier and Type | Method and Description |
|---|---|
void | clear(int bit)Mark the given bit false. |
boolean | complete()Returns true if all bits are set. |
int | count()Returns the number of set bits. |
boolean | equals(Object o)Compares this BitField to another object for equality. |
boolean | get(int bit)Returns true if the bit is set or false if it is not. |
byte[] | getFieldBytes()Returns the actual byte array used. |
int | hashCode()Returns a hash code value for this BitField. |
void | set(int bit)Mark the given bit true. |
void | setAll()Mark all bits true. |
String | toString() |
public CompleteBitField(int size)
size set bits.size - the number of bits in the bit fieldpublic void clear(int bit)
BitFieldpublic boolean complete()
BitFieldpublic int count()
BitFieldpublic boolean equals(Object o)
BitFieldpublic boolean get(int bit)
BitFieldpublic byte[] getFieldBytes()
BitFieldCaller should synchronize on this and copy!
getFieldBytes in class BitFieldpublic int hashCode()
BitFieldpublic void set(int bit)
BitFieldpublic void setAll()
BitField