Is there a good reason why there is no Pair<L,R>
in Java? What would be the equivalent of this C++ construct? I would rather avoid reimplementing my own.
It seems that 1.6 is providing something similar (AbstractMap.SimpleEntry<K,V>
), but this looks quite convoluted.