Is there a good reason why there is no Pair<L,R>
in Java? 有没有一个很好的理由说明Java中没有Pair<L,R>
? What would be the equivalent of this C++ construct? 这个C ++构造的等价物是什么? I would rather avoid reimplementing my own. 我宁愿避免从新实现本身。 ui
It seems that 1.6 is providing something similar ( AbstractMap.SimpleEntry<K,V>
), but this looks quite convoluted. 彷佛1.6提供了相似的东西( AbstractMap.SimpleEntry<K,V>
),但这看起来很复杂。 this