pair in java generics
843793Feb 2 2007 — edited Nov 15 2008Perhaps I have missed something, but as far as I can tell, there is no pair template in the generic data structure classes provided with the jdk
C++ has pair<T1, T2> which is quite useful. The closest java type I can find is Map.Entry, but of course, you can't construct one of these.
Is there a generic Pair class for java that I have somehow overlooked? If not, why has such a basic generic type been excluded from the library?