|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.javasoft.util.concurrent.ConcurrentBitSet
public class ConcurrentBitSet
An ConcurrentBitSet is pretty much the same as a BitSet,
but operations on the set are performed in a thread-safe manner.
| Constructor Summary | |
|---|---|
ConcurrentBitSet()
|
|
ConcurrentBitSet(BitSet bitSet)
|
|
ConcurrentBitSet(int bitCapacity)
|
|
ConcurrentBitSet(String bitString)
|
|
| Method Summary | |
|---|---|
void |
and(ConcurrentBitSet with)
|
void |
andNot(ConcurrentBitSet with)
This set becomes this & not with |
int |
cardinality()
|
int |
cardinality(int fromBit,
int toBit)
|
void |
clear()
|
void |
clear(int bit)
|
ConcurrentBitSet |
clone()
|
boolean |
compareAndSet(int bit,
boolean expect,
boolean update)
Atomically sets the value to the given updated value if the current value == the expected value. |
boolean |
equals(Object obj)
|
void |
flip(int bit)
|
boolean |
get(int bit)
|
static ConcurrentBitSet |
getAnd(ConcurrentBitSet setA,
ConcurrentBitSet setB)
|
static ConcurrentBitSet |
getAndNot(ConcurrentBitSet setA,
ConcurrentBitSet setB)
Returns setA and not setB |
static ConcurrentBitSet |
getOr(ConcurrentBitSet setA,
ConcurrentBitSet setB)
|
static ConcurrentBitSet |
getXor(ConcurrentBitSet setA,
ConcurrentBitSet setB)
|
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isSubSetOf(ConcurrentBitSet of)
|
int |
length()
|
static void |
main(String[] args)
|
int |
nextClearBit(int from)
|
int |
nextSetBit(int from)
|
void |
or(ConcurrentBitSet with)
|
static ConcurrentBitSet |
readFrom(InputStream in)
|
void |
set(int bit)
|
void |
set(int bit,
boolean value)
|
BitSet |
toBitSet()
|
long[] |
toLongArray()
|
long[] |
toLongArray(long[] arr,
int offset)
|
String |
toString()
|
void |
writeTo(OutputStream out)
|
void |
xor(ConcurrentBitSet with)
This set becomes this ^ with |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConcurrentBitSet()
public ConcurrentBitSet(int bitCapacity)
public ConcurrentBitSet(BitSet bitSet)
public ConcurrentBitSet(String bitString)
| Method Detail |
|---|
public void set(int bit,
boolean value)
public void set(int bit)
public boolean compareAndSet(int bit,
boolean expect,
boolean update)
== the expected value.
bit - the bit indexexpect - the expected valueupdate - the new value
public void clear(int bit)
public void clear()
public void flip(int bit)
public boolean get(int bit)
public boolean isSubSetOf(ConcurrentBitSet of)
public void and(ConcurrentBitSet with)
public void or(ConcurrentBitSet with)
public void xor(ConcurrentBitSet with)
public void andNot(ConcurrentBitSet with)
public static ConcurrentBitSet getXor(ConcurrentBitSet setA,
ConcurrentBitSet setB)
public static ConcurrentBitSet getOr(ConcurrentBitSet setA,
ConcurrentBitSet setB)
public static ConcurrentBitSet getAnd(ConcurrentBitSet setA,
ConcurrentBitSet setB)
public static ConcurrentBitSet getAndNot(ConcurrentBitSet setA,
ConcurrentBitSet setB)
public int length()
public boolean isEmpty()
public ConcurrentBitSet clone()
clone in class Objectpublic int cardinality()
public int cardinality(int fromBit,
int toBit)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic int nextSetBit(int from)
public int nextClearBit(int from)
public BitSet toBitSet()
public void writeTo(OutputStream out)
throws IOException
IOException
public static ConcurrentBitSet readFrom(InputStream in)
throws IOException
IOExceptionpublic long[] toLongArray()
public long[] toLongArray(long[] arr,
int offset)
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||