|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.wegra.util.bitset.BitSet
A class representation of specific bit pattern.
| Constructor Summary | |
BitSet(boolean[] bits)
Creates a BitSet has specific value. |
|
BitSet(int bitLength)
Creates a BitSet has specific length. |
|
| Method Summary | |
void |
change(BitSet source)
Changes current bitset to given source.
|
void |
clear(int index)
Clears (set as 0) a specific bit. |
void |
clear(int fromIndex,
int toIndex)
Clears the bits from the specified fromIndex(inclusive) to the specified toIndex(exclusive) to false. |
void |
clearAll()
Clears all bits of current bitset. |
java.lang.Object |
clone()
Clones this BitSet and returns it. |
boolean |
equals(java.lang.Object target)
Indicates whether some other object is "equal to" this one. |
boolean |
getAt(int index)
Returns the value of the bit with the specified index. |
int |
getLength()
Returns the length of current bitset. |
BitSet |
getSubset(int fromIndex,
int toIndex)
Returns a subset of current bitset. |
void |
set(int index)
Sets the bit at the specified index to true. |
void |
set(int fromIndex,
BitSet src,
int srcStart,
int length)
Copies part of current bitset from given src's. |
void |
set(int fromIndex,
int toIndex)
Sets the bits from the specified fromIndex(inclusive) to the specified toIndex(exclusive) to true. |
void |
setAll()
Sets all bits of current bitset to true. |
void |
setValue(int value)
|
java.lang.String |
toString()
Returns a string representation of this bitset. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BitSet(boolean[] bits)
public BitSet(int bitLength)
| Method Detail |
public void clear(int index)
0) a specific bit.
index - index of target bit.
public void clear(int fromIndex,
int toIndex)
fromIndex - index of the first bit to be cleared.toIndex - index after the last bit to be cleared.public void clearAll()
public void set(int index)
index - a bit index to set.
public void set(int fromIndex,
int toIndex)
fromIndex - index of the first bit to be cleared.toIndex - index after the last bit to be cleared.
public void set(int fromIndex,
BitSet src,
int srcStart,
int length)
src's.
fromIndex - a position to start copy of current bitset.src - source bitset.srcStart - a position to start copy of source bitset.length - length to copy.public void setValue(int value)
public void setAll()
public java.lang.Object clone()
public boolean equals(java.lang.Object target)
target - the reference object with which to compare.
public boolean getAt(int index)
index - the bit index
public int getLength()
public BitSet getSubset(int fromIndex,
int toIndex)
public void change(BitSet source)
source.
Current bitset will lost all old values,
and be completly changed with new one.
source - sourcepublic java.lang.String toString()
1
and a clear bit will be 0.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||