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 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. |
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |