ABSTRACT

Strengths: Separate chaining is applicable even when only an extremely small fraction of U will be held in the collection, and it guarantees expected constant time performance for all primary methods. In addition, separate chaining very naturally and easily can remove elements from the collection, and minimizes the need to resize the underlying array when n is changing significantly. For separate chaining, the only mutations that invalidate the markers are those that remove elements or that resize the table. Thus, calls to add or addAll that do not cause the table to resize are not critical. An application program can ensure that iteration can always continue with a consistent order in spite of concurrent additions to the set by calling ensureCapacity with an appropriate value before the iterator is initialized.