Java集合框架成員:Collection系列,Map系列,Iterator系列。
Collection、Map:盛裝其他對象。
Iterator:遍歷Collection集合中的元素。
Iterator迭代訪問Collection集合元素時(shí),集合中的元素不能被改變,只能用Iterator的remove方法。
Collection -- Set -- EnumSet
Collection -- SortedSet -- TreeSet
Collection -- HashSet -- LinckedHashSet
Collection -- Queue -- Deque -- ArrayDeque
Collection -- Queue --PriorityDeque
Collection -- List -- ArrayList
Collection -- Vector -- Stack
Collection -- Queue -- Deque
-- LinckedList
Collection -- List
Map -- EnumMap
Map --WeakHashMap
Map -- IdentityHashMap
Map -- HashMap(線程不安全,Key,Value允許null) -- LinckedHashMap
Map -- HashTable(線程安全,key,Value允許null) -- Properties
Map -- SortedMap -- Treemap
操作集合類的工具類Collections
對元素的操作:排序,查詢,修改,將集合設(shè)置成不可變,對集合對象實(shí)現(xiàn)同步控制等。
同步控制:Collections.synchronizedXxx();
設(shè)置不可變:emptyXxx(),SingetonXxx(),unmodifiableXxx()