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
相關文章
相關標籤/搜索