com.go.trove.util
Class Pair

java.lang.Object
  |
  +--com.go.trove.util.Pair
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class Pair
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Simple object for pairing two objects together for use as a hash or tree key.

Version:
5 , 01/07/09
Author:
Brian S O'Neill
See Also:
MultiKey, Serialized Form

Constructor Summary
Pair(java.lang.Object obj1, java.lang.Object obj2)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(java.lang.Object obj1,
            java.lang.Object obj2)
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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