|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MainHw2
This is a sample program to use with your homework #2. You will note it looks similar to the old MainHw1 program; however, I have make various modifications to make it easier to use. The differences are that
HashSetLinear
and
HashSetSeparateChaining
as
new possibilities for
the type of myDict.
HashSetLinear
and
HashSetSeparateChaining
do not return the
elements in the set in any particular order. HashSetLinear
.
(The default implementation in AbstractSet
is
inappropriate as it works by creating an iterator and sequentially
seeking for theelement.
Method Summary | |
static void |
main(java.lang.String[] args)
This is a initial main program for testing purposes. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static void main(java.lang.String[] args)
Collection
's. It illustrates how
to create and use an Iterator
over a Collection
.
It includes code for counting the number of adds and removes and for counting the number of comparisons and number of collisions.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |