|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.backend.util.BitMapSet
Set of small integers represented in bit vector.
| Nested Class Summary | |
static class |
BitMapSet.Iterator
|
| Field Summary | |
(package private) static int |
WORDSIZE
|
| Constructor Summary | |
BitMapSet()
Create empty set. |
|
BitMapSet(int size)
Create set of given size |
|
| Method Summary | |
void |
add(int x)
Add integer x. |
void |
addAll(NumberSet x)
Add all elements of another NumberSet x to this set. |
void |
addAllTo(NumberSet x)
Add all elements of this set to another NumberSet x. |
void |
clear()
Clear set |
java.lang.Object |
clone()
Return copy of the object. |
boolean |
contains(int x)
Return true if set has the integer x in it. |
void |
copy(NumberSet x)
Copy another NumberSet x to this object. |
boolean |
equals(java.lang.Object x)
Return true if x is same as this set. |
boolean |
exist(int x)
Return true if set has the integer x in it. |
NumberSet.Iterator |
iterator()
Enumerate all members. |
void |
join(BitMapSet x)
Join operation. |
static void |
main(java.lang.String[] argv)
Unit test driver |
void |
meet(BitMapSet x)
Meet operation. |
int |
nextElement(int from)
Return an element greater than or equal to 'from'. |
void |
remove(int x)
Remove integer x. |
void |
removeAll(NumberSet x)
Remove all elements of another NumberSet x from this set. |
void |
removeAllFrom(NumberSet x)
Remove all elements of this set from another NumberSet x. |
int |
size()
Return the number of elements. |
void |
subtract(BitMapSet x)
Subtract operation. |
void |
toArray(int[] a)
Convert to array |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
static final int WORDSIZE
| Constructor Detail |
public BitMapSet()
public BitMapSet(int size)
| Method Detail |
public int size()
size in interface NumberSetpublic void clear()
clear in interface NumberSetpublic void add(int x)
add in interface NumberSetpublic void remove(int x)
remove in interface NumberSetpublic boolean exist(int x)
public boolean contains(int x)
contains in interface NumberSetpublic void copy(NumberSet x)
copy in interface NumberSetpublic void addAll(NumberSet x)
addAll in interface NumberSetpublic void addAllTo(NumberSet x)
addAllTo in interface NumberSetpublic void join(BitMapSet x)
public void meet(BitMapSet x)
public void removeAll(NumberSet x)
removeAll in interface NumberSetpublic void removeAllFrom(NumberSet x)
removeAllFrom in interface NumberSetpublic void subtract(BitMapSet x)
public int nextElement(int from)
public NumberSet.Iterator iterator()
iterator in interface NumberSetpublic void toArray(int[] a)
toArray in interface NumberSetpublic boolean equals(java.lang.Object x)
equals in interface NumberSetpublic java.lang.Object clone()
NumberSet
clone in interface NumberSetpublic java.lang.String toString()
public static void main(java.lang.String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||