The Interfaces from Collection framework
The collections framework defines several interfaces.
Interface | Description |
---|---|
Collection | Enables you to work with groups of objects; it is at the top of the collections hierarchy |
List | Extends Collection to handle sequences (lists of objects) |
Set | Extends Collection to handle sets, which must contain unique elements |
SortedSet | Extends Set to handle sorted sets |
The Collection Classes
The standard collection classes are summarized in the following table:
Class | Description |
---|---|
AbstractCollection | Implements most of the Collection interface. |
AbstractList | Extends AbstractCollection and implements most of the List interface. |
AbstractSequentialList | Extends AbstractList for use by a collection that uses sequential rather than random access of its elements. |
LinkedList | Implements a linked list by extending AbstractSequentialList. |
ArrayList | Implements a dynamic array by extending AbstractList. |
AbstractSet | Extends AbstractCollection and implements most of the Set interface. |
HashSet | Extends AbstractSet for use with a hash table. |
LinkedHashSet | Extends HashSet to allow insertion-order iterations. |
TreeSet | Implements a set stored in a tree. Extends AbstractSet. |