Professional Documents
Culture Documents
3
Ê 3his class implements the Set interface and guarantees that the sorted set will be in
ascending element order, sorted according to the natural order of the elements or by the
comparator provided at set creation time, depending on which constructor is used.
Ê 3his implementation not synchronized provides guaranteed log(n) time cost for the basic
operations (add, remove and contains).
Ê 3he M
class does not guarantee that the order will remain constant over
time.
Ê 3his implementation provides constant-time performance for the basic operations (get
and put), assuming the hash function disperses the elements properly among the buckets.
Ê 3he HashMap implementation is not synchronized. f multiple threads access this map
concurrently, and at least one of the threads modifies the map structurally, it must be
synchronized externally.
J
Ê 3he J implements a growable array of objects where the size of the vector can
grow or shrink as needed dynamically.
Ê Like an array, it contains components that can be accessed using an integer index.
Ê An application can increase the capacity of a vector before inserting a large number of
components; this reduces the amount of incremental reallocation.
Ê Hash3able is synchronized.
Ê terator in the HashMap is fail-safe while the enumerator for the Hashtable isn¶t.
Ê Hashtable doesn¶t allow nulls
Ê Ê 3his class offers constant time performance for the basic operations (add, remove,
contains and size), assuming the hash function disperses the elements properly among the
buckets.