|
|
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
The core collection interfaces are the foundation of the Java Collections Framework.The Java Collections Framework hierarchy consists of two distinct interface trees:
These interfaces allow collections to be manipulated independently of the details of their representation.
- The first tree starts with the
Collectioninterface, which provides for the basic functionality used by all collections, such asaddandremovemethods. Its subinterfaces Set,List, andQueue provide for more specialized collections.The
Setinterface does not allow duplicate elements. This can be useful for storing collections such as a deck of cards or student records. TheSetinterface has a subinterface,SortedSet, that provides for ordering of elements in the set.The
Listinterface provides for an ordered collection, for situations in which you need precise control over where each element is inserted. You can retrieve elements from aListby their exact position.The
Queueinterface enables additional insertion, extraction, and inspection operations. Elements in aQueueare typically ordered in on a FIFO basis.- The second tree starts with the
Mapinterface, which maps keys and values similarly to aHashtable.
Map's subinterface,SortedMap, maintains its key-value pairs in ascending order or in an order specified by aComparitor.
|
|
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.