JDK-4983155 : Alpha Feedback: add generic Pair class
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_2.5
  • CPU: sparc
  • Submitted: 2004-01-24
  • Updated: 2004-02-05
  • Resolved: 2004-02-05
Related Reports
Duplicate :  
Relates :  
Description
Submitted by  Ola Gustafsson <###@###.###>

Something which would be great in Tiger, is a generic Pair class. Nothing 
spectacular, just a way to group two values of various classes:

Pair<String,String> values = new Pair<String,String>();

I think this would be greatly appreciated by the community, and it wouldn't 
involve much effort in development.

Comments
EVALUATION A generic pair class has certain advantages, but can do more harm than good. If you write your own, more specialized pair classes, you can give the fields better names. ###@###.### 2004-02-05
05-02-2004