de.aitools.dm.clusterlabeling.common
Class Pair<FIRST,SECOND>

java.lang.Object
  extended by de.aitools.dm.clusterlabeling.common.Pair<FIRST,SECOND>
All Implemented Interfaces:
java.lang.Comparable<Pair<FIRST,SECOND>>

public class Pair<FIRST,SECOND>
extends java.lang.Object
implements java.lang.Comparable<Pair<FIRST,SECOND>>

\cf{http://stackoverflow.com/questions/156275/what-is-the-equivalent-of-the-c-pairl-r-in-java}

Version:
$Id: Pair.java,v 1.1 2012/01/11 19:19:55 hoppe Exp $

Field Summary
 FIRST first
           
 SECOND second
           
 
Method Summary
 int compareTo(Pair<FIRST,SECOND> o)
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
static
<FIRST,SECOND>
Pair<FIRST,SECOND>
of(FIRST first, SECOND second)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

first

public final FIRST first

second

public final SECOND second
Method Detail

of

public static <FIRST,SECOND> Pair<FIRST,SECOND> of(FIRST first,
                                                   SECOND second)

compareTo

public int compareTo(Pair<FIRST,SECOND> o)
Specified by:
compareTo in interface java.lang.Comparable<Pair<FIRST,SECOND>>

hashCode

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

equals

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

toString

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