What is new in Java 6.0 Collections API?

by Krishna Srinivasan

Mustang has few interesting changes in the Collections APIs, one amoung them is the Deque. Deque is used for the Bi-Directional traversal. It has different implementations including BlockingDeque,ArrayDeque,etc.

Deque and ArrayDeque

Deque is the abbreviation of "Double Ended Queue". A Collection that allows us to add (or) remove elements at both ends. Deque supports total size of collection for both fixed and unspecified size limits.

Deque implementation can be used as Stack(Last in first out ) or Queue(First in First Out).For each insertion, retrieval and removal of elements from deque there exists methods in 2 flavours. One will throw exception if it fails in an operation and another one returns status or special value for each operation.

What is new in Java 6.0 Collections API?

4 Comments

MikeInBuilding7
2007-03-18 06:30:46
Sounds like a cool idea.
Any examples of usage?
Cana
2007-03-19 10:44:14
Sounds like they're putting the "kitchen's sink" in this API.
google
2007-03-19 14:17:52
hello from google...
Infernoz
2007-03-22 07:30:37
I thought LinkedList in 1.4+ already did this.