com.intel.hadoop.graphbuilder.util
Class Pair<L,R>
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Pair
public Pair(L l,
R r)
- Construct a pair with left = l and right = r.
- Parameters:
l
- r
-
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