|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Set
A set of non-null
objects. The set is based on an
array, and will grow as needed to accomodate additional items.
Constructor Summary | |
Set()
Constructs a set with an initial size of 32 elements. |
|
Set(int size)
Constructs a set with room for size elements. |
Method Summary | |
void |
add(java.lang.Object obj)
Add an object to the set. |
void |
clear()
Clears the set. |
boolean |
empty()
Is the set empty? |
boolean |
member(java.lang.Object obj)
Compares obj to the item is the set to determine
if obj is already a member of the set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Set()
public Set(int size)
size
elements. The
set will grow as needed.size
- the initial size.Method Detail |
public boolean empty()
true
if the set is empty.public boolean member(java.lang.Object obj)
obj
to the item is the set to determine
if obj
is already a member of the set. The
objects are compared using equals
.obj
- the object to test.true
if the object is already a member.public void add(java.lang.Object obj)
null
.public void clear()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |