|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.javac.util.Bits
public class Bits
A class for extensible, mutable bit sets.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Constructor Summary | |
---|---|
Bits()
Construct an initially empty set. |
|
Bits(int[] bits)
Construct a set consisting initially of given bit vector. |
|
Bits(int start,
int limit)
Construct a set consisting initially of given range. |
Method Summary | |
---|---|
Bits |
andSet(Bits xs)
this set = this set & xs. |
void |
clear()
This set = {}. |
Bits |
diffSet(Bits xs)
this set = this set \ xs. |
Bits |
dup()
Return a copy of this set. |
void |
excl(int x)
Exclude x from this set. |
void |
incl(int x)
Include x in this set. |
void |
inclRange(int start,
int limit)
Include [start..limit) in this set. |
boolean |
isMember(int x)
Is x an element of this set? |
static void |
main(java.lang.String[] args)
Test Bits.nextBit(int). |
int |
nextBit(int x)
Return the index of the least bit position >= x that is set. |
Bits |
orSet(Bits xs)
this set = this set | xs. |
java.lang.String |
toString()
a string representation of this set. |
Bits |
xorSet(Bits xs)
this set = this set ^ xs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Bits()
public Bits(int[] bits)
public Bits(int start, int limit)
Method Detail |
---|
public void clear()
public Bits dup()
public void incl(int x)
public void inclRange(int start, int limit)
public void excl(int x)
public boolean isMember(int x)
public Bits andSet(Bits xs)
public Bits orSet(Bits xs)
public Bits diffSet(Bits xs)
public Bits xorSet(Bits xs)
public int nextBit(int x)
for (int i = bits.nextBit(0); i>=0; i = bits.nextBit(i+1)) ...
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |