https://docs.oracle.com/javase/tutorial/collections/interfaces/index.html
Collection可以说是把多个元素组合在一起的一种对象。Java中的collection分为5大类。对于这6类分别有对应的interface:set/list/queue/deque/map interfaces。These interfaces allow collections to be manipulated independently of the details of their representation.
Collection是基类,它规定了一系列methods用来使用操作collection,因此collection的子类都可以使用这些基本的methods,而每个子类如Set interface又规定了针对Set的一系列methods。注意其中map并不是一个真正的collection。
Set
— a collection that cannot contain duplicate elements. HashSet不保证每次枚举出来的顺序是一样的。LinkedHashSet可以保证顺序。
List
— an ordered collection (sometimes called a sequence). List
s can contain duplicate elements. The us