(1) Three kinds of collection Views:key sets, value sets, Key-value
(2) Order: An iterator (interators) returns the order of the map elements, like TreeMap, but HashMap does not
(3) The implementation class of the map must provide two constructs:
1. Parameterless constructor for constructing an empty map
Public HashMap () {
this.loadfactor = default_load_factor;
threshold = (int) (default_initial_capacity * default_load_factor);
Table = new Entry[default_initial_capacity];
Init ();
}
2. A constructor with a unique map parameter to construct a map with the same key value pair
Public HashMap (map<. Extends K,? extends v> m) {This
(Math.max ((int) (M.size ()/Default_load_factor) + 1,
default_initial_capacity), default_load_factor);
Putallforcreate (m);
}
Used to copy any map
Although an interface cannot provide a constructor, it is not mandatory to specify that the implementation class must contain both constructors, but all implementation classes contain
(4) A free call to methods in the object class, such as Equals and hashcode
Attention:
(1) Key cannot be duplicated, a key corresponds to a value of up to
(2) The type of key should be noted that the map itself is not allowed as a key type
Note that the method definitions for equals and hashcode are problematic, and the override needs to be synchronized