A Java collection of value pairs? (tuples)

In java, similar to strcuture class is resent.

So to store the data as collections pair. use the folllowing class format.

public class Pair<L,R> {

  private final L left;
  private final R right;

  public Pair(L left, R right) {
    this.left = left;
    this.right = right;

  public L getLeft() { return left; }
  public R getRight() { return right; }

  public int hashCode() { return left.hashCode() ^ right.hashCode(); }

  public boolean equals(Object o) {
    if (o == null) return false;
    if (!(o instanceof Pair)) return false;
    Pair pairo = (Pair) o;
    return this.left.equals(pairo.getLeft()) &&