be.ac.ulg.montefiore.run.totem.util
Class Pair<O1,O2>

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.util.Pair<O1,O2>

public class Pair<O1,O2>
extends java.lang.Object

Simple class that handle pairs of objects.

Creation date: 5 janv. 2006

Author:
Ga�l Monfort (monfort@run.montefiore.ulg.ac.be)

Constructor Summary
Pair(O1 first, O2 second)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 O1 getFirst()
          return the first element of the pair.
 O2 getSecond()
          get the second element of the pair.
 int hashCode()
           
 void setFirst(O1 first)
          sets the first element of the pair.
 void setSecond(O2 second)
          set the second element of the pair
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(O1 first,
            O2 second)
Method Detail

getFirst

public O1 getFirst()
return the first element of the pair.

Returns:

setFirst

public void setFirst(O1 first)
sets the first element of the pair.

Parameters:
first -

getSecond

public O2 getSecond()
get the second element of the pair.

Returns:

setSecond

public void setSecond(O2 second)
set the second element of the pair

Parameters:
second -

equals

public boolean equals(java.lang.Object o)
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


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.