This Pair class stores two elements of the same generic type. Implement the min which returns the smaller of the two elements. The elements must be instances of the Comparable interface.

Complete the following file:

public class Pair<T ...> { private T e1; private T e2; /** Constructs a Pair. @param e1 is the first member @param e2 is the second member */ public Pair(T e1, T e2) { this.e1 = e1; this.e2 = e2; } public ... min() { ... } }

Use the following file:

public class PairTester
   public static void main(String[] args)
      Pair<Integer> pair1 = new Pair<Integer>(29, 17);
      Integer m1 = pair1.min();
      System.out.println("Expected: 17");
      Pair<String> pair2 = new Pair<String>("Hello", "World");
      String m2 = pair2.min();
      System.out.println("Expected: Hello");