|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.peermanager.piecepicker.util.BitFlags
public class BitFlags
Field Summary | |
---|---|
int |
end
Index of last set bit |
boolean[] |
flags
The array of bit flags |
int |
nbSet
how many bits are set |
int |
start
Index of first set bit |
Constructor Summary | |
---|---|
BitFlags(BitFlags other)
clone constructor |
|
BitFlags(boolean[] _flags)
|
|
BitFlags(int count)
|
Method Summary | |
---|---|
BitFlags |
and(BitFlags other)
Experimental. |
void |
clear()
|
Object |
clone()
|
boolean |
equals(Object o)
|
int |
hashCode()
|
void |
set(int i)
for setting a flag that is not known to be the first or last, or not |
void |
setAll()
|
void |
setEnd(int i)
this is for setting a flag that is already known to be the last true flag |
void |
setOnly(int i)
clears the array then sets the given flag |
void |
setStart(int i)
for setting a flag that is already known to be the first true flag |
int |
size()
You can read flags.length instead (but please don't modify it) |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int start
public int end
public int nbSet
public final boolean[] flags
Constructor Detail |
---|
public BitFlags(int count)
public BitFlags(boolean[] _flags)
public BitFlags(BitFlags other)
Method Detail |
---|
public Object clone()
clone
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public int size()
public void clear()
public void setStart(int i)
public void set(int i)
public void setEnd(int i)
public void setOnly(int i)
public void setAll()
public BitFlags and(BitFlags other)
other
- BitFlags to be ANDed with this BitFlags. Must not be null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |