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.<
Pair
Good News JavaFX has a key value Pair.
JavaFX
just add javafx as a dependency and import javafx.util.Pair;
javafx.util.Pair
and use simply as in c++ .
c++
e.g.
Pair pr = new Pair() pr.get(key);// will return corresponding value