当前页面:
在线文档首页 >
JDK 5 Documentation v1.5.0, Java 2 SDK 英文文档
Collections Framework Change Summary - JDK 5 Documentation v1.5.0, Java 2 SDK 英文文档
|
Collections Framework API Change Summary
|
This page summarizes the differences between the 1.2 and 1.3 releases
of the Collections Framework, along with a brief rationale for each change.
Convenience Implementations
- Added singletonList and singletonMap.
Previously, there was a convenience implementation for singleton Set, but no
corresponding implementation for List and Map.
- Added EMPTY_MAP.
Previously, there were constants for the empty Set and List, but no
corresponding constant for Map.
Special-purpose Implementation
-
Added Map
constuctor for WeakHashMap. The
Map interface dictates that most
Map implementations should have a "copy constructor" that takes a Map
argument. WeakHashMap lacked such a constructor in the 1.2 release.