edu.rice.cs.javalanglevels
Class Pair<T,U>

java.lang.Object
  extended by edu.rice.cs.javalanglevels.Pair<T,U>

public class Pair<T,U>
extends java.lang.Object

Utility class, allows us to store two things as a single object.


Constructor Summary
Pair(T first, U second)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 T getFirst()
           
 U getSecond()
           
 int hashCode()
          Define a hash code based on the first and second's hash code
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(T first,
            U second)
Method Detail

getFirst

public T getFirst()

getSecond

public U getSecond()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Define a hash code based on the first and second's hash code

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object