This article was reproduced from: http://www.cnblogs.com/skywang12345/p/3308498.html
the Java collection can be divided into 4 parts: list lists, set sets, map mappings, tool classes (iterator Iterators, enumeration enumeration classes, arrays, and collections).
General Description:
First grab its trunk, collection and map.
1 collection is an interface that is a highly abstracted collection that contains the basic operations and properties of a collection .
The collection contains the list and set of the two major branches.
The list is an ordered queue, and each element has its index . The index value of the first element is 0.
the list implementation class has LinkedList, ArrayList, Vector, Stack.
Set is a collection that does not allow repeating elements .
The implementation class for set has Hastset and TreeSet. HashSet relies on HashMap, which is actually implemented through HashMap; TreeSet relies on treemap, which is actually implemented by TreeMap .
2 map is a mapping interface, which is a Key-value key-value pair . Each element in the map contains "one key" and "key corresponding to value".
Abstractmap is an abstract class that implements most of the APIs in the map interface. and Hashmap,treemap,weakhashmap are inherited from Abstractmap.
Although Hashtable inherits from dictionary, it implements the map interface.
Next, look at Iterator. It is a tool for iterating through a collection, that is, we usually traverse the collection through the iterator iterator. We say that collection relies on iterator because the collection implementation class implements the iterator () function and returns a iterator object.
Listiterator is specifically designed to traverse the list.
look again at enumeration, which is the abstract class introduced by JDK 1.0. Functions, like iterator, also traverse collections, but enumeration are less powerful than iterator. In the above block diagram, enumeration can only be used in Hashtable, Vector, and Stack .
Finally, look at arrays and collections. These are the two tool classes that manipulate arrays and collections .
With the overall framework above, we then analyze each class separately.
One of the Java Collections (framework introduction)