/**
 * Copyright (c) 2012-2012 Malhar, Inc.
 * All rights reserved.
 */
package com.malhartech.util;

import java.io.Serializable;

public class Pair<F, S> implements Serializable {
  private static final long serialVersionUID = 731157267102567944L;

  private F first;
  private S second;

  public Pair(F first, S second) {
      this.first = first;
      this.second = second;
  }

  public void setFirst(F first) {
      this.first = first;
  }

  public void setSecond(S second) {
      this.second = second;
  }

  public F getFirst() {
      return first;
  }

  public S getSecond() {
      return second;
  }

  @Override
  public String toString() {
    return "[" + first + "," + second + "]";
  }

}
@@ -172,17 +172,17 @@
 alizable
- 
+%0A
 %7B%0A  priv
@@ -243,26 +243,30 @@
 67944L;%0A
-%0A
   p
-rivate
+ublic final
  F first
@@ -270,22 +270,27 @@
 rst;%0A  p
-rivate
+ublic final
  S secon
@@ -299,47 +299,88 @@
 %0A%0A  
-public Pair(F first, S second) %7B%0A      
+@Override%0A  public int hashCode()%0A  %7B%0A    int hash = 7;%0A    hash = 41 * hash + (
 this
@@ -390,23 +390,70 @@
 rst 
+!
 = 
-first;%0A      
+null ? this.first.hashCode() : 0);%0A    hash = 41 * hash + (
 this
@@ -464,63 +464,325 @@
 ond 
+!
 = 
-second;%0A  %7D%0A%0A  public void setFirst(F first) %7B%0A      
+null ? this.second.hashCode() : 0);%0A    return hash;%0A  %7D%0A%0A  @Override%0A  public boolean equals(Object obj)%0A  %7B%0A    if (obj == null) %7B%0A      return false;%0A    %7D%0A    if (getClass() != obj.getClass()) %7B%0A      return false;%0A    %7D%0A    @SuppressWarnings(%22unchecked%22)%0A    final Pair%3CF, S%3E other = (Pair%3CF, S%3E)obj;%0A    if (
 this
@@ -792,46 +792,283 @@
 rst 
+!
 = 
-first
+other.first && (this.first == null %7C%7C !this.first.equals(other.first))) %7B%0A      return false
 ;%0A  
+ 
+ 
 %7D%0A
-%0A  public void setSecond(
+    if (this.second != other.second && (this.second == null %7C%7C !this.second.equals(other.second))) %7B%0A      return false;%0A    %7D%0A    return true;%0A  %7D%0A%0A  public Pair(F first, 
 S se
@@ -1072,21 +1072,45 @@
  second)
+%0A 
  %7B%0A  
+  this.first = first;%0A
     this
@@ -1153,21 +1153,21 @@
 tFirst()
- %7B
 %0A  
+%7B%0A
     retu
@@ -1203,21 +1203,21 @@
 Second()
+%0A 
  %7B%0A
-  
     retu
@@ -1270,16 +1270,18 @@
 String()
+%0A 
  %7B%0A    r

Introduce hashcode and equals property.