Java中C ++ Pair 的等价物是什么? - What is the equivalent of the C++ Pair in Java?

问题:

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


解决方案:

参考一: https://stackoom.com/question/eeZ/Java中C-Pair-L-R-的等价物是什么
参考二: https://oldbug.net/q/eeZ/What-is-the-equivalent-of-the-C-Pair-L-R-in-Java
相关文章
相关标签/搜索