com.intel.hadoop.graphbuilder.util
Class Pair<L,R>

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.util.Pair<L,R>
Type Parameters:
L -
R -

public class Pair<L,R>
extends java.lang.Object

Represents a pair of objects.

Author:
Haijie Gu

Constructor Summary
Pair(L l, R r)
          Construct a pair with left = l and right = r.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 L getL()
           
 R getR()
           
 int hashCode()
           
 Pair<R,L> reverse()
           
 void setL(L l)
           
 void setR(R r)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(L l,
            R r)
Construct a pair with left = l and right = r.

Parameters:
l -
r -
Method Detail

getL

public L getL()
Returns:
the left value.

getR

public R getR()
Returns:
the right value.

setL

public void setL(L l)
Parameters:
l - the new value for the left value.

setR

public void setR(R r)
Parameters:
r - the new value for the right value.

reverse

public Pair<R,L> reverse()
Returns:
a reversed pair.

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