|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for set of nonnegative integers.
| Nested Class Summary | |
static interface |
NumberSet.Iterator
|
| Method Summary | |
void |
add(int x)
Add number x to set. |
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 contents of set. |
java.lang.Object |
clone()
Return copy of the object. |
boolean |
contains(int x)
Return true if x is in the set. |
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. |
NumberSet.Iterator |
iterator()
Enumerate all members. |
void |
remove(int x)
Remove number x from set. |
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 |
toArray(int[] a)
Set elements to array a. |
| Method Detail |
public int size()
public void clear()
public void add(int x)
public void addAll(NumberSet x)
public void addAllTo(NumberSet x)
public void remove(int x)
public void removeAll(NumberSet x)
public void removeAllFrom(NumberSet x)
public boolean contains(int x)
public NumberSet.Iterator iterator()
public void toArray(int[] a)
public void copy(NumberSet x)
public boolean equals(java.lang.Object x)
public java.lang.Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||