The Java collections framework standardizes the way in which groups of objects are handled by your programs.
The Collection Interfaces:
The collections framework defines several interfaces. This section provides an overview of each interface:
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:
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.
SortedSet subSet(Object start, Object end) Returns a SortedSet that includes those elements between start and end–1. Elements in the returned collection are also referenced by the invoking object.
SortedSet tailSet(Object start) Returns a SortedSet that contains those elements greater than or equal to start that are contained in the sorted set. Elements in the returned
set are also referenced by the invoking object.
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.
No comments:
Post a Comment