What is the equivalent of the C++ Pair in Java?

前端 未结 30 1020
一个人的身影
一个人的身影 2020-11-22 02:29

Is there a good reason why there is no Pair in Java? What would be the equivalent of this C++ construct? I would rather avoid reimplementing my own.<

30条回答
  •  醉话见心
    2020-11-22 02:53

    com.sun.tools.javac.util.Pair is an simple implementation of a pair. It can be found in jdk1.7.0_51\lib\tools.jar.

    Other than the org.apache.commons.lang3.tuple.Pair, it's not just an interface.

提交回复
热议问题