package smart_gs.util;

public class Triple<Fst,Snd,Thrd> {

	  private final Fst first;
	  private final Snd second;
	  private final Thrd third;

	  public Triple (Fst first1, Snd second1, Thrd third1) {
	    this.first = first1;
	    this.second = second1;
	    this.third = third1;
	  }

	  public Fst getFirst() { return first; }
	  public Snd getSecond() { return second; }
	  public Thrd getThird() { return third; }

	  public int hashCode() { return first.hashCode() ^ second.hashCode() ^ third.hashCode(); }

	  public boolean equals(Object o) {
	    if (o == null) return false;
	    if (!(o instanceof Triple)) return false;
	    Triple tripleo = (Triple) o;
	    return this.first.equals(tripleo.getFirst()) &&
	           this.second.equals(tripleo.getSecond()) &&
	           this.third.equals(tripleo.getThird());
	  }

	}
