This page summarizes enhancements to the collections framework in Java SE 6.
This release saw fewer API changes than 5.0, but there was more of
a focus on the accuracy and clarity of the specification. We
recommend using the Java SE 6 specification even when writing programs
for older releases.
The primary theme of the API changes was better bi-directional
collection access.
These new collection interfaces are provided:
Deque
- a double ended queue, supporting element insertion and
removal at both ends. Extends the Queue interface.
BlockingDeque
- a Deque with operations that wait for the deque to become
non-empty when retrieving an element, and wait for space to become
available in the deque when storing an element. Extends both the
Deque and BlockingQueue interfaces.
(This interface is part of java.util.concurrent.)
NavigableSet
- a SortedSet extended with navigation methods reporting
closest matches for given search targets. A NavigableSet may be
accessed and traversed in either ascending or descending order.
This interface is intended to supersede the SortedSet interface.
NavigableMap
- a SortedMap extended with navigation methods returning the
closest matches for given search targets. A NavigableMap may
be accessed and traversed in either ascending or descending key order.
This interface is intended to supersede the SortedMap interface.