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