HashSet
HashSet
1 | public class HashSet<E> |
This class implements the Set interface, backed by a hash table (actually a HashMap instance).
Note that this implementation is not synchronized.Set s = Collections.synchronizedSet(new HashSet(...));
1 | public class HashSet<E> |
This class implements the Set interface, backed by a hash table (actually a HashMap instance).
Note that this implementation is not synchronized.Set s = Collections.synchronizedSet(new HashSet(...));
1 | public class Hashtable<K,V> |
null object can be used as a key or as a value. Unlike the new collection implementations, {@code Hashtable} is synchronized.
A reentrant mutual exclusion {@link Lock} with the same basic behavior and semantics as the implicit monitor lock accessed using {@code synchronized} methods and statements, but with extended capabilities.
1 | public class ReentrantLock implements Lock, java.io.Serializable |
A hash table supporting full concurrency of retrievals and high expected concurrency for updates.
SubClass should implements non-arguments constructor and constructor(Map)
This interface takes the place of the Dictionary class, which was a totally abstract class rather than an interface.
Note: great care must be exercised if mutable objects are used as map keys.
The behavior of a map is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is a key in the map.
A special case of this prohibition is that it is not permissible for a map to contain itself as a key.
While it is permissible for a map to contain itself as a value, extreme caution is advised: the equals and hashCode methods are no longer well defined on such a map.
1 | public class HashMap<K,V> extends AbstractMap<K,V> |
Hash table based implementation of the Map interface.
This implementation provides all of the optional map operations, and permits null values and the null key.
(The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls.)
This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time.
A mutable sequence of characters. This class provides an API compatible with {@code
StringBuffer}, butwith no guarantee of synchronization.
This class is designed for use as a drop-in replacement for {@code StringBuffer} in places where the string buffer was being used by a single thread (as is generally the case).
Where possible,it is recommended that this class be used in preference to {@code StringBuffer} as it will be faster under most implementations.
Unless otherwise noted, passing a {@code null} argument to a constructor or method in this class will cause a {@link NullPointerException} to be thrown.
1 | public final class StringBuilder |