|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.util.BitSet
public class BitSet
Represents a set of 8 bits and provides methods for convenient bit manipulation.
| Constructor Summary | |
|---|---|
BitSet()
Initializes the new instance with the default value 0. |
|
BitSet(int initialValue)
Initializes the new instance with the given value. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns true, if the given arguments equals the receiver. |
int |
getValue()
Returns the byte value, that is the combination of the 8 bits. |
int |
hashCode()
Returns the receiver's hash value. |
boolean |
isBitNotSet(int bit)
Returns true, if the bit defined by the argument is not set. |
boolean |
isBitSet(int bit)
Returns true, if the bit defined by the argument is set. |
void |
setBit(int bit)
Sets the bit defined by the argument. |
void |
toggleBit(int bit)
Switches a set bit to unset and a unset bit to set. |
java.lang.String |
toString()
Returns the string representation of the receiver. |
void |
unsetBit(int bit)
Unsets the bit defined by the argument. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BitSet()
public BitSet(int initialValue)
| Method Detail |
|---|
public int getValue()
public boolean isBitSet(int bit)
bit - The bit to test ( 0 - 7 )public boolean isBitNotSet(int bit)
bit - The bit to test ( 0 - 7 )public void setBit(int bit)
bit - The bit to manipulate ( 0 - 7 )public void unsetBit(int bit)
bit - The bit to manipulate ( 0 - 7 )public void toggleBit(int bit)
bit - The bit to toggle ( 0 - 7 )public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||